[Mono-list] Is DateTime.Now correct ?

Philip Van Hoof spamfrommailing@freax.org
01 Jan 1970 00:59:59 +0100


[root@pluisje freax]# mcs Test.cs
Compilation succeeded
[root@pluisje freax]# date
Thu Jan  1 00:02:18 CET 1970
[root@pluisje freax]# date -s "1970-01-01"
Thu Jan  1 00:00:00 CET 1970
[root@pluisje freax]# date
Thu Jan  1 00:00:01 CET 1970
[root@pluisje freax]# mono Test.exe
e: 12/31/1969 23:00:06
621355932065124730
[root@pluisje freax]# cat Test.cs
using System;
using System.IO;
using System.Runtime.InteropServices;
public class Test {
  public static int Main (string[] args)
  {
    DateTime e = DateTime.Now;
    Console.WriteLine("e: {0}", e.ToString());
    Console.WriteLine("{0}", e.Ticks);
    return -1;
  }
}
[root@pluisje freax]#

It looks like DateTime.Now is 60 minutes wrong .. :-\



-- 
Philip Van Hoof a.k.a. freax
me at freax dot org
http://www.freax.be -- http://www.freax.eu.org -- http://www.freax.org