Browse Source

[cs] Fix Date.fromTime (see #4584)

This fixes failing test added in eca09499dc7b101eaacd2d1ad61f60ddde506e43 on my machine.
I expected it to fail on Travis as well, but it didn't for some reason. Probably it has something to do
with sytem clock set to UTC on *nixes, let's see if that commit will fail on AppVeyor (and fixed by this commit).
Dan Korostelev 9 years ago
parent
commit
3d08598711
1 changed files with 1 additions and 1 deletions
  1. 1 1
      std/cs/_std/Date.hx

+ 1 - 1
std/cs/_std/Date.hx

@@ -106,7 +106,7 @@ import haxe.Int64;
 
 
 	static public inline function fromTime( t : Float ) : Date
 	static public inline function fromTime( t : Float ) : Date
 	{
 	{
-		return new Date(new DateTime(cast(t * cast(TimeSpan.TicksPerMillisecond, Float), Int64) + epochTicks));
+		return new Date(cs.system.TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(cast(t * cast(TimeSpan.TicksPerMillisecond, Float), Int64) + epochTicks)));
 	}
 	}
 
 
 	static public function fromString( s : String ) : Date
 	static public function fromString( s : String ) : Date