|
![](/i/fill.gif) |
something more like this
#macro round(f,n)
#local c = floor(pow(10.0,n));
#local dd = 0.5 / c;
#local dd = dd + abs(f);
#local dd = dd * c;
#local dd=floor(dd);
#local dd = dd/c;
#if (f < 0.0) #local dd = dd * -1; #end
(dd)
#end
#declare DST = 1;
#declare TimeZone = 8-DST; // inlcude DST
#macro julian(Y,M,D)
#if (M < 3)
#local Y = Y - 1;
#local M = M + 12;
#end
#local A = floor(Y / 100.0);
#local B = 2 - A + floor(A / 4.0);
#local J = floor(365.25 * (Y + 4716.0)) + floor(30.6001 * (M + 1)) + D + B -
1524.5;
#local H = val(date("%H"))+TimeZone;
#local M = val(date("%M"));
#local S = val(date("%S"));
#local J = J + ((H*3600 + M*60 + S)/86400);
J
#end
#macro j2ctime(j)
//j2ctime(julian)
#local s = j - 2440587.5;
#local d = floor(s) * 86400;
#local s = s - floor(s);
#local s = s * 100000;
round(s/1.157407407+d,0)
#end
#version unofficial MegaPov 1.21;
#declare JD = julian(val(date("%Y")),val(date("%m")),val(date("%d")));
echof(JD)
echof(j2ctime(JD))
echof(JD)
I found timezone strings not numbers, if it doesnt exist, (who knows)
then !strcmp a list of tz strings and return a num for full automation.
But that still leaves DST that bush has screwedup, man I thought I was stupid.
that moron takes the effin cake
Post a reply to this message
|
![](/i/fill.gif) |