www.digitalmars.com         C & C++   DMDScript  

D - [BUG](low) wrong conversion in std.date

reply Manfred Nowak <svv1999 hotmail.com> writes:
code:

import std.date;

void main(){
  static int times[3]=[
  -61367296,
  -36334592,
  -11301888]
  ;

  d_time t= parse("1 1 1970");
  for( int i= 0; i < 3; i++){
    printf("%.*s\n", toString( t + times[ i]));
  }
}

output:

Thu ^FA -1 08:58:13 GMT+0100 1969
Thu ^FA -1 15:55:26 GMT+0100 1969
Thu ^FA -1 22:52:39 GMT+0100 1969

So long.
Apr 06 2004
parent reply aNT <aNT_member pathlink.com> writes:
In article <c4vh2i$nuq$1 digitaldaemon.com>, Manfred Nowak says...
code:

import std.date;

void main(){
  static int times[3]=[
  -61367296,
  -36334592,
  -11301888]
  ;

  d_time t= parse("1 1 1970");
  for( int i= 0; i < 3; i++){
    printf("%.*s\n", toString( t + times[ i]));
  }
}

output:

Thu ^FA -1 08:58:13 GMT+0100 1969
Thu ^FA -1 15:55:26 GMT+0100 1969
Thu ^FA -1 22:52:39 GMT+0100 1969

So long.

Apr 06 2004
parent Ant <duitoolkit yahoo.ca> writes:
On Wed, 07 Apr 2004 01:43:10 +0000, aNT wrote:

 In article <c4vh2i$nuq$1 digitaldaemon.com>, Manfred Nowak says...
code:

import std.date;

void main(){
  static int times[3]=[
  -61367296,
  -36334592,
  -11301888]
  ;

  d_time t= parse("1 1 1970");
  for( int i= 0; i < 3; i++){
    printf("%.*s\n", toString( t + times[ i]));
  }
}

output:

Thu ^FA -1 08:58:13 GMT+0100 1969
Thu ^FA -1 15:55:26 GMT+0100 1969
Thu ^FA -1 22:52:39 GMT+0100 1969

So long.


I was just asking if this was windows or linux and suggest that we make that clear in future posts. I got the same on linux. Ant
Apr 06 2004