* localtime.cc: Temporary implementation of setting __tzrule's offset
member to be used by strftime. (__tzrule): New global variable. (tzparse): Set __tzrule's offset member appropriately.
This commit is contained in:
parent
2cd6f872f3
commit
2d7606a594
|
@ -1,3 +1,10 @@
|
||||||
|
2005-02-19 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* localtime.cc: Temporary implementation of setting __tzrule's offset
|
||||||
|
member to be used by strftime.
|
||||||
|
(__tzrule): New global variable.
|
||||||
|
(tzparse): Set __tzrule's offset member appropriately.
|
||||||
|
|
||||||
2005-02-17 Christopher Faylor <cgf@timesys.com>
|
2005-02-17 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* path.cc (path_conv::check): Set fs flag when a unix-domain socket
|
* path.cc (path_conv::check): Set fs flag when a unix-domain socket
|
||||||
|
|
|
@ -637,6 +637,20 @@ int daylight;
|
||||||
time_t altzone;
|
time_t altzone;
|
||||||
#endif /* defined ALTZONE */
|
#endif /* defined ALTZONE */
|
||||||
|
|
||||||
|
/* Must be equivalent to definiton in newlib/libc/time/local.h */
|
||||||
|
typedef struct __tzrule_struct
|
||||||
|
{
|
||||||
|
char ch;
|
||||||
|
int m;
|
||||||
|
int n;
|
||||||
|
int d;
|
||||||
|
int s;
|
||||||
|
time_t change;
|
||||||
|
int offset;
|
||||||
|
} __tzrule_type;
|
||||||
|
__tzrule_type __tzrule[2] = { {'J', 0, 0, 0, 0, (time_t)0, 0 },
|
||||||
|
{'J', 0, 0, 0, 0, (time_t)0, 0 } };
|
||||||
|
|
||||||
static long
|
static long
|
||||||
detzcode(const char *codep)
|
detzcode(const char *codep)
|
||||||
{
|
{
|
||||||
|
@ -1235,6 +1249,8 @@ tzparse(const char *name, struct state *sp, const int lastditch)
|
||||||
janfirst += year_lengths[isleap(year)] *
|
janfirst += year_lengths[isleap(year)] *
|
||||||
SECSPERDAY;
|
SECSPERDAY;
|
||||||
}
|
}
|
||||||
|
__tzrule[0].offset = -sp->ttis[1].tt_gmtoff;
|
||||||
|
__tzrule[1].offset = -sp->ttis[0].tt_gmtoff;
|
||||||
} else {
|
} else {
|
||||||
register long theirstdoffset;
|
register long theirstdoffset;
|
||||||
register long theirdstoffset;
|
register long theirdstoffset;
|
||||||
|
@ -1321,6 +1337,8 @@ tzparse(const char *name, struct state *sp, const int lastditch)
|
||||||
sp->ttis[1].tt_isdst = true;
|
sp->ttis[1].tt_isdst = true;
|
||||||
sp->ttis[1].tt_abbrind = stdlen + 1;
|
sp->ttis[1].tt_abbrind = stdlen + 1;
|
||||||
sp->typecnt = 2;
|
sp->typecnt = 2;
|
||||||
|
__tzrule[0].offset = -sp->ttis[0].tt_gmtoff;
|
||||||
|
__tzrule[1].offset = -sp->ttis[1].tt_gmtoff;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dstlen = 0;
|
dstlen = 0;
|
||||||
|
@ -1329,6 +1347,8 @@ tzparse(const char *name, struct state *sp, const int lastditch)
|
||||||
sp->ttis[0].tt_gmtoff = -stdoffset;
|
sp->ttis[0].tt_gmtoff = -stdoffset;
|
||||||
sp->ttis[0].tt_isdst = 0;
|
sp->ttis[0].tt_isdst = 0;
|
||||||
sp->ttis[0].tt_abbrind = 0;
|
sp->ttis[0].tt_abbrind = 0;
|
||||||
|
__tzrule[0].offset = -sp->ttis[0].tt_gmtoff;
|
||||||
|
__tzrule[1].offset = -sp->ttis[0].tt_gmtoff;
|
||||||
}
|
}
|
||||||
sp->charcnt = stdlen + 1;
|
sp->charcnt = stdlen + 1;
|
||||||
if (dstlen != 0)
|
if (dstlen != 0)
|
||||||
|
|
Loading…
Reference in New Issue