1 // Some helper logic for working with times.
8 static OptionalText_t _local_timezone = NONE_TEXT;
10 static void set_local_timezone(Text_t tz) {
11 setenv("TZ", Text$as_c_string(tz), 1);
16 #define WITH_TIMEZONE(tz, body) \
18 if (tz.length >= 0) { \
19 OptionalText_t old_timezone = _local_timezone; \
20 set_local_timezone(tz); \
22 set_local_timezone(old_timezone); \