angenommen es wäre jetzt 12:00, da aber Sommerzeit effektiv 11:00
nun liegen wir ja in GMT +01:00 ... aber auch da gilt(?) die Sommerzeit ... also habe wir 10:00 oder doch 11:00 Uhr ?
und was ist dann UTC ? würde die Zeiten "so" stimmen ?
nun habe ich ja +GMT und -GMT Zonen während es mit New York GMT -05:00 stimmt ist bei Seoul GMT +09:00 etwas falsch ... aber was ...
effektive ist Seoul + 7Std "vor raus" ... aber wie komme ich dahin ?
Bias -540 sind ja 9 Std und DayLightBias ist -60 = 1 Std ( kann nicht mehr sein als -60 )
und die "Formel" lautet
da 540 -60 = 8 Std. sind "müsste" in GMT auch noch DayLightBias = -60 sein damit ich auf 7 Std. komme.// Standard Time = GMT - Bias - StandardBias
// Daylight Saving Time = GMT - Bias - DaylightBias
bei New York habe ich effektive -6 Std.
Bias 300 = 5 Std und DayLightBias = -60 = 1 Std ... wenn aber GMT mit DayLightBias = -60 arbeitet komme ich nicht auf 6 Std ...
also was läuft bei diesem Code verkehrt, wobei StandardBias immer = 0 ist
Code: Alles auswählen
nBias := ::aWorkZone[I_ZONE0][I_Bias ]
nStandardBias := ::aWorkZone[I_ZONE0][I_StandardBias]
nDaylightBias := ::aWorkZone[I_ZONE0][I_DaylightBias]
// Standard Time = GMT - Bias - StandardBias
//
// die Werte sind negative also "+"
//
::nGMT := nTime + nBias + nStandardBias
// nur debug
nGMT := ::nGMT
cGMT := XF_SEC2HMS(::nGMT)
ALTD()
// Daylight Saving Time = GMT - Bias - DaylightBias
//
// die Werte sind negative also "+"
//
::nGMT := nTime + nBias + nDaylightBias
// nur debug
nRealTime := ::nGMT - nDaylightBias // negative - -> + 1 Std
nDiff := nDaylightBias
cUTC := XF_SEC2HMS(nRealTime)
ALTD()
...
nBias := ::aWorkZone[I_ZONE2][I_Bias ]
nStandardBias := ::aWorkZone[I_ZONE2][I_StandardBias]
nDaylightBias := ::aWorkZone[I_ZONE2][I_DaylightBias]
nSec := ::nGMT
IF nBias > 0 // New York -5 GMT effektive -6 Std.
nSec -= nBias
* nSec -= nDiff
IF nDaylightBias <> 0
// Daylight Saving Time = GMT - Bias - DaylightBias
nSec -= nDaylightBias
ELSE
// Standard Time = GMT - Bias - StandardBias
nSec -= nStandardBias
ENDIF
ELSE // Seoul -9 GMT effektive +7 Std.
nSec -= nBias
* nSec += nDiff
IF nDaylightBias <> 0
// Daylight Saving Time = GMT - Bias - DaylightBias
nSec -= nDaylightBias
ELSE
// Standard Time = GMT - Bias - StandardBias
nSec -= nStandardBias
ENDIF
ENDIF
IF nSec < 0
nSec += 86400
ENDIF
IF nSec >= 86400
nSec -= 86400
ENDIF
cString := XF_SEC2HMS( nSec )
::oTimeRemote:setCaption( cString )
ALTD()