diff options
author | ivan <ivan@13f79535-47bb-0310-9956-ffa450edef68> | 2022-07-08 20:55:13 +0000 |
---|---|---|
committer | ivan <ivan@13f79535-47bb-0310-9956-ffa450edef68> | 2022-07-08 20:55:13 +0000 |
commit | e14eabe505f7fd2754677e7aa115a71ec97ae584 (patch) | |
tree | f32898df4cd25c2acc1e6f9a5d8e9a55480a118a /time | |
parent | 34937dc22217195188b95b3ed8fb521d60f0d821 (diff) | |
download | libapr-e14eabe505f7fd2754677e7aa115a71ec97ae584.tar.gz |
Replace tabs to spaces.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902583 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'time')
-rw-r--r-- | time/win32/time.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/time/win32/time.c b/time/win32/time.c index a9b067f3a..e0ac4738b 100644 --- a/time/win32/time.c +++ b/time/win32/time.c @@ -136,43 +136,43 @@ APR_DECLARE(apr_status_t) apr_time_exp_lt(apr_time_exp_t *result, { SYSTEMTIME st; FILETIME ft, localft; - TIME_ZONE_INFORMATION *tz; - SYSTEMTIME localst; - apr_time_t localtime; + TIME_ZONE_INFORMATION *tz; + SYSTEMTIME localst; + apr_time_t localtime; AprTimeToFileTime(&ft, input); - get_local_timezone(&tz); - - FileTimeToSystemTime(&ft, &st); - - /* The Platform SDK documents that SYSTEMTIME/FILETIME are - * generally UTC. We use SystemTimeToTzSpecificLocalTime - * because FileTimeToLocalFileFime is documented that the - * resulting time local file time would have DST relative - * to the *present* date, not the date converted. - * The time value makes a roundtrip, localst cannot be invalid below. - */ - SystemTimeToTzSpecificLocalTime(tz, &st, &localst); - SystemTimeToAprExpTime(result, &localst); - result->tm_usec = (apr_int32_t) (input % APR_USEC_PER_SEC); - - - /* Recover the resulting time as an apr time and use the - * delta for gmtoff in seconds (and ignore msec rounding) - */ - SystemTimeToFileTime(&localst, &localft); - FileTimeToAprTime(&localtime, &localft); - result->tm_gmtoff = (int)apr_time_sec(localtime) - - (int)apr_time_sec(input); - - /* To compute the dst flag, we compare the expected - * local (standard) timezone bias to the delta. - * [Note, in war time or double daylight time the - * resulting tm_isdst is, desireably, 2 hours] - */ - result->tm_isdst = (result->tm_gmtoff / 3600) - - (-(tz->Bias + tz->StandardBias) / 60); + get_local_timezone(&tz); + + FileTimeToSystemTime(&ft, &st); + + /* The Platform SDK documents that SYSTEMTIME/FILETIME are + * generally UTC. We use SystemTimeToTzSpecificLocalTime + * because FileTimeToLocalFileFime is documented that the + * resulting time local file time would have DST relative + * to the *present* date, not the date converted. + * The time value makes a roundtrip, localst cannot be invalid below. + */ + SystemTimeToTzSpecificLocalTime(tz, &st, &localst); + SystemTimeToAprExpTime(result, &localst); + result->tm_usec = (apr_int32_t) (input % APR_USEC_PER_SEC); + + + /* Recover the resulting time as an apr time and use the + * delta for gmtoff in seconds (and ignore msec rounding) + */ + SystemTimeToFileTime(&localst, &localft); + FileTimeToAprTime(&localtime, &localft); + result->tm_gmtoff = (int)apr_time_sec(localtime) + - (int)apr_time_sec(input); + + /* To compute the dst flag, we compare the expected + * local (standard) timezone bias to the delta. + * [Note, in war time or double daylight time the + * resulting tm_isdst is, desireably, 2 hours] + */ + result->tm_isdst = (result->tm_gmtoff / 3600) + - (-(tz->Bias + tz->StandardBias) / 60); return APR_SUCCESS; } |