Administrator
|
I have the following without success.
(Locale named: #'sv_SE.CP1252') readTimestampFrom: '2012-01-04 08:19:41.293' readStream. Thanks, Aik-Siong Koh |
(Locale named: #'sv_SE.CP1252') readTimestampFrom: '2012-01-04
08:19:41.293' readStream => January 4, 2012 8:00:00 AM but, (Locale named: #'sv_SE.CP1252') timePolicy timeSeparator => $. "16r002E" therefore, (Locale named: #'sv_SE.CP1252') readTimestampFrom: '2012-01-04 08.19.41.293' readStream => January 4, 2012 8:19:41 AM HTH, -Boris -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of askoh Sent: Friday, January 13, 2012 3:54 PM To: [hidden email] Subject: [vwnc] How to make Timestamp from '2012-01-04 08:19:41.293' I have the following without success. (Locale named: #'sv_SE.CP1252') readTimestampFrom: '2012-01-04 08:19:41.293' readStream. Thanks, Aik-Siong Koh -- View this message in context: http://forum.world.st/How-to-make-Timestamp-from-2012-01-04-08-19-41-293 -tp4293383p4293383.html Sent from the VisualWorks mailing list archive at Nabble.com. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by askoh
What version of VisualWorks are you trying this with?
What is the value of Locale.LocalePoolType in your image? From: [hidden email] on behalf of askoh Sent: Fri 1/13/2012 12:53 PM To: [hidden email] Subject: [vwnc] How to make Timestamp from '2012-01-04 08:19:41.293' I have the following without success. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by askoh
In the images I checked, this worked OK with the new (CLDR) locales, but failed with Legacy locales. Therefore, I am assuming you are using a release of VisualWorks after 7.6, which contains the new locales, but that you have switched the system to legacy Locales as documented in the Internationalization Manual.
Therefore, change the method TimestampReader>>_se (note the leading underscore in the method name) from
timeSelector := #readLocaleTimeFrom:.
dateSelector := #readLocaleDateFrom:. timestampSelector := #readLocaleTimestampFrom: to:
timeSelector := #readLatinTimeFrom:.
dateSelector := #readLatinDateFrom:. timestampSelector := #readLatinTimestampFrom: and you should be able to create a Timestamp object from this textual representation using the Swedish locale. This is queued for inclusion in VisualWorks 7.9 as AR 64617.
From: [hidden email] on behalf of askoh
Sent: Fri 1/13/2012 12:53 PM To: [hidden email] Subject: [vwnc] How to make Timestamp from '2012-01-04 08:19:41.293' I have the following without success. Thanks, -- Sent from the VisualWorks mailing list archive at Nabble.com. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |