[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] [bug] "DateTime printOn:" output cannot be parsed with

From: Nikita Kalinin
Subject: [Help-smalltalk] [bug] "DateTime printOn:" output cannot be parsed with "DateTime readFrom:"
Date: Sun, 24 Aug 2014 07:40:59 -0700

Issue status update for Post a follow up:

Project:      GNU Smalltalk
Version:      <none>
Component:    Base classes
Category:     bug reports
Priority:     normal
Assigned to:  Unassigned
Reported by:  nixo
Updated by:   nixo
Status:       active

Unlike Date, Time, Duration the DateTime instance cannot be initialized
with a string which is generated by DateTime itself.

st> DateTime now
st> DateTime readFrom: stdin

The DateTime prints itself as YYYY-MM-DD + 'T' + HH:MM:SS +
[(+|-)HH:MM[:SS]] (or [Date]T[Time][+-Offset]) and these format
hardcoded. However readFrom: expects [Date] [Duration]. An offset should
be set with offset: aDuration messsage.

st> dt := DateTime readFrom: stdin
2014-08-24 00:17:50:20
st> dt offset: (Duration days: 0 hours: 4 minutes: 0 seconds: 0)

So there is now way to read/write date and time simultaneously.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]