[Pharo-project] Fixed: Issue 2754 - DateAndTime creation from string/stream using incorrect default offset
http://code.google.com/p/pharo/issues/detail?id=2754 Fix in PharoInbox SLICE-Issue-2754-CreationFromStringOrStreamDefaultsToLocalOffset-SeanDeNigris.1 -- View this message in context: http://forum.world.st/Fixed-Issue-2754-DateAndTime-creation-from-string-stre... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
hi sean what is the DateAndTime localOffset? "Answer the duration we are offset from UTC" Your changes basically uses DateAndTime localOffset when no offset is specified (and before it used zero). It sounds reasonable but I was wondering the impact. Stef On Aug 5, 2010, at 10:57 PM, Sean P. DeNigris wrote:
http://code.google.com/p/pharo/issues/detail?id=2754
Fix in PharoInbox SLICE-Issue-2754-CreationFromStringOrStreamDefaultsToLocalOffset-SeanDeNigris.1 -- View this message in context: http://forum.world.st/Fixed-Issue-2754-DateAndTime-creation-from-string-stre... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Stéphane Ducasse wrote:
what is the DateAndTime localOffset? "Answer the duration we are offset from UTC"
http://en.wikipedia.org/wiki/Coordinated_Universal_Time - In casual use, when fractions of a second are not important, Greenwich Mean Time (GMT) can be considered equivalent to UTC or UT1. In fact, saying "GMT" often implies either UTC or UT1. For this reason, saying "GMT" is generally avoided in technical contexts, with an unambiguous terminology of "UTC" or "UT1" preferred instead. Stéphane Ducasse wrote:
Your changes basically uses DateAndTime localOffset when no offset is specified (and before it used zero). It sounds reasonable but I was wondering the impact.
Yes, that's correct. I changed it for two reasons: 1. when someone says, "6pm," I don't think they ever mean GMT (unless, of course, that's their local time). 2. The non-[string|stream] instance creation methods (e.g. DateAndTime date: Date today time: Time now) do not operate that way, and return a DateAndTime like "2010-08-10T17:11:36-04:00" (with my local offset) HTH, Sean -- View this message in context: http://forum.world.st/Fixed-Issue-2754-DateAndTime-creation-from-string-stre... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
thanks for the explanation. I will integrate your changes. Stef
what is the DateAndTime localOffset? "Answer the duration we are offset from UTC"
http://en.wikipedia.org/wiki/Coordinated_Universal_Time - In casual use, when fractions of a second are not important, Greenwich Mean Time (GMT) can be considered equivalent to UTC or UT1. In fact, saying "GMT" often implies either UTC or UT1. For this reason, saying "GMT" is generally avoided in technical contexts, with an unambiguous terminology of "UTC" or "UT1" preferred instead.
Stéphane Ducasse wrote:
Your changes basically uses DateAndTime localOffset when no offset is specified (and before it used zero). It sounds reasonable but I was wondering the impact.
Yes, that's correct. I changed it for two reasons: 1. when someone says, "6pm," I don't think they ever mean GMT (unless, of course, that's their local time). 2. The non-[string|stream] instance creation methods (e.g. DateAndTime date: Date today time: Time now) do not operate that way, and return a DateAndTime like "2010-08-10T17:11:36-04:00" (with my local offset)
HTH, Sean -- View this message in context: http://forum.world.st/Fixed-Issue-2754-DateAndTime-creation-from-string-stre... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (2)
-
Sean P. DeNigris -
Stéphane Ducasse