[Glass] DateAndTime ... all pretty strange

Richard Sargent via Glass glass at lists.gemtalksystems.com
Wed Jan 11 15:17:15 PST 2017


GLASS mailing list wrote
> <!DOCTYPE html>
> 
>     
> If I execute "DateAndTime now printString" I get (e.g.)
> '2017-01-11T20:37:32.28995895385742+01:00', which looks pretty ok.
> It's a little bit strange about the many digits in the fractional part
> of seconds - but it seems, that this is allowed. If you give this string
> to e.g. Python it will throw an exception (e.g. via json) - due to the
> many digits. For this purposes you have to cut the number of digits to
> about 3 to 5 - then its work. Now try the reverse with "(DateAndTime
> fromString: '2017-01-11T20:37:32.28995895385742+01:00')
> printString" and you get:
> "'2017-01-11T20:37:32+06:00'". That feels very strange
> ...... Some other tests: (DateAndTime fromString:
> '2017-01-11T20:37:32.289+01:00')  printString  ->
> '2017-01-11T20:37:32+01:00' (DateAndTime fromString:
> '2017-01-11T20:37:32.28995+01:00')  printString ->
> '2017-01-11T20:37:32+03:00' For me this seems to be badly broken
> (Gemstone/S 3.3.3) ... any other solution in Gemstone to parse more
> difficult DateTime stuff ??? 

Using a virgin 3.3.3 database, I get the following:
topaz 1> printit
{
(DateAndTime fromString: '2017-01-11T20:37:32.289+01:00')  printString.
(DateAndTime fromString: '2017-01-11T20:37:32.28995895385742+01:00')
printString.
(DateAndTime fromString: '2017-01-11T20:37:32.289+01:00')  printString.
(DateAndTime fromString: '2017-01-11T20:37:32.28995+01:00')  printString
}
%
a Array
  #1 2017-01-11T20:37:32.28899997472763+01:00
  #2 2017-01-11T20:37:32.28995895385742+01:00
  #3 2017-01-11T20:37:32.28899997472763+01:00
  #4 2017-01-11T20:37:32.28995001316071+01:00
topaz 1>

Using a 3.3.1 database with Seaside and all loaded, I get this:
topaz 1> printit
{
(DateAndTime fromString: '2017-01-11T20:37:32.289+01:00')  printString.
(DateAndTime fromString: '2017-01-11T20:37:32.28995895385742+01:00')
printString.
(DateAndTime fromString: '2017-01-11T20:37:32.289+01:00')  printString.
(DateAndTime fromString: '2017-01-11T20:37:32.28995+01:00')  printString
}
%
a Array
  #1 2017-01-11T20:37:32.289+01:00
  #2 2017-01-11T20:37:32.28995895385742+01:00
  #3 2017-01-11T20:37:32.289+01:00
  #4 2017-01-11T20:37:32.28995+01:00
topaz 1>


I do not see the wildly wandering offsets; I do see a difference in how the
precision is parsed.


Can you provide more information about your configuration?





--
View this message in context: http://forum.world.st/DateAndTime-all-pretty-strange-tp4929365p4929384.html
Sent from the GLASS mailing list archive at Nabble.com.


More information about the Glass mailing list