Ciao,
i have a problem when i print a TimeStamp ( TimeStamp fromString: '10-28-2014 11:11:11 am') report -> 10/28/2014 11:11:11 The system don't report the dd mm year format as i need. I setup the system with: run | time | time:= TimeZone timeDifferenceHrs: 1 dstHrs: 1 atTimeHrs: 2 fromDayNum: 95 toDayNum: 304 on: #Sunday beginning: 1967 stdPrintString: 'Germany Standard Time' dstPrintString: 'Germany Legal Time'. TimeZone for:#Germany put: time. TimeZone default: time DateTime now. report -> 25/11/2014 16:26:28 ( it's right ). Into GLASS 2.4 the system report TimeStamp in the right format, and i think don't did any other change - setup into it. Considerations? Thank, Dario _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
I forgot:
I have a problem into GLASS 3.1.0.6. > Ciao, > > i have a problem when i print a TimeStamp > > ( TimeStamp fromString: '10-28-2014 11:11:11 am') report -> 10/28/2014 11:11:11 > > > The system don't report the dd mm year format as i need. > > I setup the system with: > > run > | time | > time:= TimeZone timeDifferenceHrs: 1 dstHrs: 1 atTimeHrs: 2 > fromDayNum: 95 toDayNum: 304 on: #Sunday beginning: 1967 > stdPrintString: 'Germany Standard Time' dstPrintString: 'Germany Legal Time'. > TimeZone for:#Germany put: time. > TimeZone default: time > > > DateTime now. report -> 25/11/2014 16:26:28 ( it's right ). > > > Into GLASS 2.4 the system report TimeStamp in the right format, > > and i think don't did any other change - setup into it. > > > Considerations? > > > Thank, > > Dario > _______________________________________________ > Glass mailing list > [hidden email] > http://lists.gemtalksystems.com/mailman/listinfo/glass _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Dario, In order to control the format of Date printing you need to use #asStringUsingFormat:. The format array for DD/MM/YYY is:#(1 2 3 $/ 1 1 $: true true false) asStringUsingFormat: anArray "Returns a String that expresses the receiver in the format defined by anArray. Generates an error if anArray contains an incorrect formatting specification. See the class documentation of Date for a complete description of the String-formatting specification Array." | strm | strm := WriteStream on: String new. strm nextPutAll: (self date asStringUsingFormat: anArray); space; nextPutAll: self time printString. ^ strm contents Dale On Tue, Nov 25, 2014 at 8:38 AM, Dario Trussardi via Glass <[hidden email]> wrote: I forgot: _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Free forum by Nabble | Edit this page |