From 3cc46310c344b8c039fedfd3b943241477d033ff Mon Sep 17 00:00:00 2001 From: Masashi Umezawa Date: Sat, 3 Feb 2024 23:34:37 +0900 Subject: [PATCH] Override MpPhPortableUtil >> timestampFromSeconds: seconds nanos: nanoSeconds. This implementation no longer works in Squeak 5+. --- .../instance/timestampFromSeconds.nanos..st | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 repository/MessagePack-Pharo-Core.package/MpPhPortableUtil.class/instance/timestampFromSeconds.nanos..st diff --git a/repository/MessagePack-Pharo-Core.package/MpPhPortableUtil.class/instance/timestampFromSeconds.nanos..st b/repository/MessagePack-Pharo-Core.package/MpPhPortableUtil.class/instance/timestampFromSeconds.nanos..st new file mode 100644 index 0000000..270fc07 --- /dev/null +++ b/repository/MessagePack-Pharo-Core.package/MpPhPortableUtil.class/instance/timestampFromSeconds.nanos..st @@ -0,0 +1,6 @@ +actions +timestampFromSeconds: seconds nanos: nanoSeconds + | ts | + ts := DateAndTime fromSeconds: seconds + 2177452800 offset: 0. + nanoSeconds > 0 ifTrue: [ ts setNanoSeconds: nanoSeconds]. + ^ts \ No newline at end of file