Diff
Not logged in

Differences From Artifact [cbe5b50ba1]:

To Artifact [e3f246c66f]:


927
928
929
930
931
932
933





934
935
936
937
938
939
940
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945







+
+
+
+
+







    const time_t *t,
    int useGMT)
{
    struct tm *tmPtr;
    time_t time;

    if (!useGMT) {
#if defined(_MSC_VER) && (_MSC_VER >= 1900)
#	undef timezone /* prevent conflict with timezone() function */
	long timezone = 0;
#endif

	tzset();

	/*
	 * If we are in the valid range, let the C run-time library handle it.
	 * Otherwise we need to fake it. Note that this algorithm ignores
	 * daylight savings time before the epoch.
	 */
955
956
957
958
959
960
961




962
963
964
965
966
967
968
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977







+
+
+
+







#else
#define LOCALTIME_VALIDITY_BOUNDARY	0
#endif

	if (*t >= LOCALTIME_VALIDITY_BOUNDARY) {
	    return TclpLocaltime(t);
	}

#if defined(_MSC_VER) && (_MSC_VER >= 1900)
	_get_timezone(&timezone);
#endif

	time = *t - timezone;

	/*
	 * If we aren't near to overflowing the long, just add the bias and
	 * use the normal calculation. Otherwise we will need to adjust the
	 * result at the end.