comparison syscalls.c @ 33:d3b7d4964807

Create a TZ info structure for ACST and use it when printing times.
author Daniel O'Connor <darius@dons.net.au>
date Tue, 27 Nov 2012 15:56:31 +1030
parents 435c6330896c
children 2ecde7a4bc55
comparison
equal deleted inserted replaced
32:188d5a8a7470 33:d3b7d4964807
145 145
146 void 146 void
147 __tz_unlock (void) { 147 __tz_unlock (void) {
148 } 148 }
149 149
150 /* Set tzinfo directly so we don't need tzset() which requires getenv() */
151 #ifdef USE_UTC
150 static __tzinfo_type tzinfo = {1, 0, 152 static __tzinfo_type tzinfo = {1, 0,
151 { {'J', 0, 0, 0, 0, (time_t)0, 0L }, 153 { {'J', 0, 0, 0, 0, (time_t)0, 0L },
152 {'J', 0, 0, 0, 0, (time_t)0, 0L } 154 {'J', 0, 0, 0, 0, (time_t)0, 0L }
153 } 155 }
154 }; 156 };
157 #else
158 /* ACST (south)
159 * Switch from DST 3am 1st Sunday of April: -9.5 hours to UTC
160 * Switch to DST 2am 1st Sunday October: -10.5 hours to UTC
161 *
162 * Copied from http://www.sourceware.org/ml/newlib/2008/msg00311.html
163 */
164 static __tzinfo_type tzinfo = {0, 0, {
165 {'M', 4, 5, 0, 10800, (time_t)0, -37800L },
166 {'M', 10, 5, 0, 7200, (time_t)0, -34200L }
167 }
168 };
169 #endif
155 170
156 __tzinfo_type * 171 __tzinfo_type *
157 __gettzinfo (void) { 172 __gettzinfo (void) {
158 return &tzinfo; 173 return &tzinfo;
159 } 174 }