Hi all. In Playground I write these lines: Transcript cr; show: DateAndTime now printString. Transcript cr; show: (DateAndTime fromSeconds: (DateAndTime now asSeconds)) printString.
and in the Transcript window I get these results: 2020-06-15T14:33:06.630367+10:00 2020-06-15T14:33:06+10:00 I was expecting these two to be the same. I was hoping to use DateAndTime fromSeconds: and aDateAndTime asSeconds to convert a DateAndTime to/from a number in order to store it in SQLite, but I don't like the way the nanos are dropped using this method. It's all good if I remember to call DateAndTime now truncated, and drop the nanos myself, but that might be all over the place in my application. Instead, is there a better way to convert a DateAndTime to and from a number? -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html