Update contrib.
1 /** @file ../include/time.h
5 /** @fn asctime(const struct tm *tm)
8 Refer to ctime() for the documentation
22 @return clock is just for build support and hence returns 0.
28 determines the amount of processor time used since the invocation of the
29 calling process, measured in CLOCKS_PER_SEC s of a second.
31 Note: the clock system call eventually calls Symbian OS call user::GetCpuTime(),
32 which is not supported from version 8.0b, hence this api is included for build
41 /** @fn ctime(const time_t *clock)
44 Note: This description also covers the following functions -
45 difftime() asctime() localtime() gmtime() mktime() ctime_r() localtime_r() gmtime_r() asctime_r()
47 @return Each of these functions returns the value described, NULL, or -1 in the case of mktime if an error was detected.
49 The functions ctime, gmtime and localtime all take as an argument a time value representing the time
50 in seconds since the Epoch (00:00:00 UTC, January 1, 1970); see time
52 The function localtime converts the time value pointed at by clock and returns a pointer to a " struct tm " (described below) which contains the broken down time information
53 for the value after adjusting for the current time zone (and any other factors
54 such as Daylight Saving Time). Time zone adjustments are performed as specified
55 by the TZ environment variable (see the tzset function). localtime uses tzset to initialize time conversion information
56 if tzset has not already been called by the process.
58 After filling in the tm structure, localtime sets the tm_isdst's Nth element of tzname to a pointer to a ASCII string that is the time zone abbreviation to be
59 used with localtime's (return, value.);
61 The function gmtime similarly converts the time value without any time zone adjustment
62 and returns a pointer to a tm structure (described below).
64 The ctime function adjusts the time value for the current time zone, in
65 the same manner as localtime, and returns a pointer to a 26-character string of the form: Thu Nov 24 18:22:48 1986
68 All the fields have constant width.
70 The ctime_r function provides the same functionality as ctime except the caller must provide the output buffer buf to store the result, which must be at least 26 characters long.
72 The localtime_r and gmtime_r functions provide the same functionality as localtime and gmtime respectively, except the caller must provide the output buffer result.
75 converts the broken down time in the structure tm pointed at by *tm to the form
76 shown in the example above.
78 The asctime_r function provides the same functionality as asctime except the caller provides the output buffer buf to store the result, which must be at least 26 characters long.
80 The functions mktime converts the broken-down time in the structure pointed to by
81 tm into a time value with the same encoding as that of the values returned by
82 the time function (that is, seconds from the Epoch, UTC). The mktime function interprets the input structure according to the current
83 timezone setting (see tzset ).
85 The original values of the tm_wday and tm_yday components of the structure are ignored, and the original values
86 of the other components are not restricted to their normal ranges and will be
87 normalized if needed. For example, October 40 is changed into November 9, a tm_hour of -1 means 1 hour before midnight, tm_mday of 0 means the day preceding the current month, and tm_mon of -2 means 2 months before January of tm_year.
89 A positive or zero value for tm_isdst causes mktime to presume initially that summer time (for example, Daylight
90 Saving Time) is or is not in effect for the specified time.. A negative value
91 for tm_isdst causes the mktime function to attempt to define whether summer time is in effect
92 for the specified time. The tm_isdst and tm_gmtoff members are forced to zero by timegm.
94 On successful completion, the values of the tm_wday and tm_yday components of the structure are set appropriately and the other
95 components are set to represent the specified calendar time, but with their
96 values forced to their normal ranges: The final value of tm_mday is not set until tm_mon and tm_year are determined.
98 The mktime function returns the specified calendar time. If the calendar
99 time cannot be represented, it returns -1.
101 The difftime function
102 returns the difference between two calendar times, ( time1 - time0), expressed in seconds.
104 External declarations as well as the tm structure definition are in the
106 #include <time.h> include file. The tm structure includes
108 at least the following fields:
112 int tm_sec; // seconds (0 - 60)
113 int tm_min; // minutes (0 - 59)
114 int tm_hour; // hours (0 - 23)
115 int tm_mday; // day of month (1 - 31)
116 int tm_mon; // month of year (0 - 11)
117 int tm_year; // year - 1900
118 int tm_wday; // day of week (Sunday = 0)
119 int tm_yday; // day of year (0 - 365)
120 int tm_isdst; // is summer time in effect?
121 char *tm_zone; // abbreviation of timezone name
122 long tm_gmtoff; // offset from UTC in seconds
127 field tm_isdst is non-zero if summer time is in effect.
129 The field tm_gmtoff is the offset (in seconds) of the time represented from UTC, with positive
130 values indicating east of the Prime Meridian.
134 //Example usage of asctime,localtime and gmtime:
141 t = time (NULL); //Get current time in seconds from Epoc
142 //Fill tm struct w.r.t localtime using localtime
143 timeptr = localtime (&t;);
144 //Use this to convert it to a string indicating time w.r.t localtime
145 asc_time = asctime (timeptr);
146 printf ("Time from asctime w.r.t localtime : %s", asc_time);
147 //Fill tm struct w.r.t GMT using gmtime
148 timeptr = gmtime (&t;);
149 //Use this to convert it to a string indicating time w.r.t GMT
150 asc_time = asctime (timeptr);
151 printf ("Time from asctime w.r.t gmtime : %s", asc_time);
158 Time from asctime w.r.t localtime : Thu Jun 22 10:42:27 2006
159 Time from asctime w.r.t gmtime : Thu Jun 22 05:12:27 2006
163 //Example usage of ctime,mktime:
170 //Fill the tm struct with values
171 timeptr.tm_year = 2001;
177 timeptr.tm_isdst = -1;
178 t = mktime (&timeptr;); //Call mktime to make time in seconds w.r.t epoc
179 //Convert this to a string indicating time using ctime
180 c_time = ctime (&t;);
181 printf ("Time from ctime : %s", c_time);
188 Time from ctime : Thu Jan 1 05:29:59 1970
192 //Example usage of difftime:
198 //Set initial and final values
201 t2 = difftime (t1, t0); //Find the time difference using difftime
202 printf ("Result of difftime = %d", t2);
209 Result of difftime = 10
220 Except for difftime, mktime, and the _r variants of the other functions,
221 these functions leaves their result in an internal static object and return
222 a pointer to that object.
223 Subsequent calls to these
224 function will modify the same object.
226 The C Standard provides no mechanism for a program to modify its current
227 local timezone setting, and the POSIX -standard method is not reentrant.
228 (However, thread-safe implementations are provided
229 in the POSIX threaded environment.)
231 The tm_zone field of a returned tm
232 structure points to a static array of characters,
233 which will also be overwritten by any subsequent calls (as well as by
234 subsequent call to tzset )
238 @externallyDefinedApi
241 /** @fn difftime(time_t time1, time_t time0)
245 Refer to ctime() for the documentation
255 @externallyDefinedApi
258 /** @fn gmtime(const time_t *clock)
261 Refer to ctime() for the documentation
271 @externallyDefinedApi
274 /** @fn localtime(const time_t *clock)
277 Refer to ctime() for the documentation
284 The localtime() is not guaranteed to be thread safe.
287 @externallyDefinedApi
290 /** @fn mktime(struct tm *tm)
293 Refer to ctime() for the documentation
303 @externallyDefinedApi
306 /** @fn strftime(char * s, size_t maxsize, const char * format, const struct tm * t)
312 The strftime function formats the information from t into the buffer s according to the string pointed to by format .
313 The format string consists of zero or more conversion specifications and
315 All ordinary characters are copied directly into the buffer.
316 A conversion specification consists of a percent sign "\%"
317 and one other character.
319 No more than maxsize characters will be placed into the array. If the total number of resulting characters, including the terminating NULL character, is not more
320 than maxsize , strftime returns the number of characters in the array, not counting
321 the terminating NULL. Otherwise, zero is returned and the buffer contents are
325 The conversion specifications are copied to the buffer after expansion as follows:-
326 %A is replaced by national representation of the full weekday name.
327 %a is replaced by national representation of the abbreviated weekday name.
328 %B is replaced by national representation of the full month name.
329 %b is replaced by national representation of the abbreviated month name.
330 %C is replaced by (year / 100) as decimal number; single digits are preceded by a zero.
331 %c is replaced by national representation of time and date.
332 %D is equivalent to "%m/%d/%y".
333 %d is replaced by the day of the month as a decimal number (01-31).
335 POSIX locale extensions. The sequences %Ec %EC %Ex %EX %Ey %EY %Od %Oe %OH %OI %Om %OM %OS %Ou %OU %OV %Ow %OW %Oy are supposed to provide alternate representations.
336 Additionally %OB implemented to represent alternative months names (used standalone, without day mentioned).
338 %e is replaced by the day of month as a decimal number (1-31); single digits are preceded by a blank.
339 %F is equivalent to "%Y-%m-%d".
340 %G is replaced by a year as a decimal number with century. This year is the one that contains the greater part of the week (Monday as the first day of the week).
341 %g is replaced by the same year as in "%G", but as a decimal number without century (00-99).
342 %H is replaced by the hour (24-hour clock) as a decimal number (00-23).
344 %I is replaced by the hour (12-hour clock) as a decimal number (01-12).
345 %j is replaced by the day of the year as a decimal number (001-366).
346 %k is replaced by the hour (24-hour clock) as a decimal number (0-23); single digits are preceded by a blank.
347 %l is replaced by the hour (12-hour clock) as a decimal number (1-12); single digits are preceded by a blank.
348 %M is replaced by the minute as a decimal number (00-59).
349 %m is replaced by the month as a decimal number (01-12).
350 %n is replaced by a newline.
352 %p is replaced by national representation of either "ante meridiem" or "post meridiem" as appropriate.
353 %R is equivalent to "%H:%M".
354 %r is equivalent to "%I:%M:%S %p".
355 %S is replaced by the second as a decimal number (00-60).
356 %s is replaced by the number of seconds since the Epoch, UTC (see mktime).
357 %T is equivalent to "%H:%M:%S".
358 %t is replaced by a tab.
359 %U is replaced by the week number of the year (Sunday as the first day of the week) as a decimal number (00-53).
360 %u is replaced by the weekday (Monday as the first day of the week) as a decimal number (1-7).
361 %V is replaced by the week number of the year (Monday as the first day of the week) as a decimal number (01-53). If the week containing January 1 has four or more days in the new year, then it is week 1; otherwise it is the last week of the previous year, and the next week is week 1.
362 %v is equivalent to "%e-%b-%Y".
363 %W is replaced by the week number of the year (Monday as the first day of the week) as a decimal number (00-53).
364 %w is replaced by the weekday (Sunday as the first day of the week) as a decimal number (0-6).
365 %X is replaced by national representation of the time.
366 %x is replaced by national representation of the date.
367 %Y is replaced by the year with century as a decimal number.
368 %y is replaced by the year without century as a decimal number (00-99).
369 %Z is replaced by the time zone name.
370 %z is replaced by the time zone offset from UTC; a leading plus sign stands for east of UTC, a minus sign for west of UTC, hours and minutes follow with two digits each and no delimiter between them (common form for RFC 822 date headers).
371 %+ is replaced by national representation of the date and time (the format is similar to that produced by 'date( )' function ).
372 %-* GNU libc extension. Do not do any padding when performing numerical outputs.
373 %_* GNU libc extension. Explicitly specify space for padding.
374 %0* GNU libc extension. Explicitly specify zero for padding.
375 %% is replaced by ‘%’.
389 locale = setlocale(LC_TIME,"en_GB.ISO-8859-1");
392 strptime("2001-11-12 18:31:01", "%Y-%m-%d %H:%M:%S", &tm;);
393 printf("sec = %d min = %d hours = %d
394 Year = %d Month = %d day = %d
396 tm.tm_sec,tm.tm_min,tm.tm_hour,tm.tm_year,tm.tm_mon,tm.tm_mday);
397 strftime(buf, sizeof(buf), "%d %B %Y %H:%M:%S", &tm;);
399 strptime("Mon","%a", &tm;);
400 strftime(buf, sizeof(buf), "%a", &tm;);
404 printf("Failed to set locale
411 sec = 1 min = 31 hours = 18
412 Year = 101 Month = 10 day = 12
413 12 November 2001 18:31:01
426 @externallyDefinedApi
429 /** @fn time(time_t *p)
431 @return On success the value of time in seconds since the Epoch is returned. On error
432 (time_t)(-1) is returned and errno is set appropriately.
434 The time function returns the value of time in seconds since 0 hours, 0
435 minutes, 0 seconds, January 1, 1970, Coordinated Universal Time. If an error occurs, time returns the value ( time_t)(-1) .
437 The return value is also stored in * p ,
438 provided that p is non-null.
443 * Detailed description : sample usage of time system call
449 if(time(&Time;) < 0 )
451 printf("Time system call failed
455 printf("Time value is %u
464 Time value is 1176916948
473 Neither -isoC-99 nor -p1003.1-2001 requires time to set errno on failure; thus, it is impossible for an application to distinguish
474 the valid time value -1 (representing the last UTC second of 1969)
475 from the error return value.
477 Systems conforming to earlier versions of the C and POSIX standards (including older versions of )
478 did not set * p in the error case.
482 @externallyDefinedApi
488 initializes time conversion information used by the library routine localtime .
489 The environment variable TZ specifies how this is done.
491 If TZ does not appear in the environment, the best available approximation
492 to local wall clock time is used.
494 If TZ appears in the environment but its value is a null string, Coordinated
495 Universal Time ( UTC )
496 is used (without leap second correction).
507 tzset(); //Call tzset
508 c_time = ctime (&t;); //Get time-string using ctime for Epoc time
509 printf ("Time from ctime after tzset: %s", c_time);
516 Time from ctime after tzset: Sun Apr 7 02:24:08 1974
538 @externallyDefinedApi
541 /** @fn clock_getres(clockid_t clock_id, struct timespec *res)
545 Refer to clock_gettime() for the documentation
553 @externallyDefinedApi
556 /** @fn clock_gettime(clockid_t clock_id, struct timespec *tp)
560 Note: This description also covers the following functions -
561 clock_settime() clock_getres() clock_getcpuclockid()
563 @return All the above APIs return 0 on success and -1 on failure.
566 #include < sys/time.h > as:
568 The clock_gettime and clock_settime allow the calling process to retrieve or set the value used by a clock
569 which is specified by clock_id.
571 The clock_id argument can be one of four values: CLOCK_REALTIME for time
572 that increments as a wall clock should, CLOCK_MONOTONIC which increments in
573 SI seconds, CLOCK_VIRTUAL for time that increments only when the CPU is running
574 in user mode on behalf of the calling process, or CLOCK_PROF for time that increments
575 when the CPU is running in user or kernel mode.
577 As Symbian OS exposes only 'wall clock time' at user level, only CLOCK_REALTIME
578 is supported for all the clock-based APIs.
580 The structure pointed to by tp is defined in
582 #include <sys/time.h> as:
587 time_ttv_sec;/* seconds */
588 longtv_nsec;/* and nanoseconds */
592 The resolution (granularity) of a clock is returned by the clock_getres system call.
593 This value is placed in a (non-NULL) *tp.
595 The clock_getcpuclockid system call returns ( in *clock_id ) the clock ID of the CPU-time clock of the process specified
596 by pid. If pid is zero, the clock ID of the CPU-time clock of the process making
597 the call is returned.
608 clock_getres (CLOCK_REALTIME, &tp;); // Call clock_getres
609 printf ("Real time-clock resolution is %d seconds and %d nanoseconds
610 ", tp.tv_sec, tp.tv_nsec);
611 clock_getcpuclockid (0 ,&clockid;); // Call clock_getcpuclockid with pid = 0
612 printf ("The clock id for the current process is %d
616 retval = clock_settime (CLOCK_REALTIME, &tp;); // Call clock_settime with 100ns
617 printf ("clock_settime returned %d
619 clock_gettime (CLOCK_REALTIME, &tp;); // Call clock_gettime to fill tp
620 printf ("Time from real time-clock is %d seconds and %d nanoseconds
621 ", tp.tv_sec, tp.tv_nsec);
628 Real time-clock resolution is 0 seconds and 1000000 nanoseconds
629 The clock id for the current process is 0
630 clock_settime returned 0
631 Time from real time-clock is 0 seconds and 70663000 nanoseconds
638 @externallyDefinedApi
641 /** @fn clock_settime(clockid_t clock_id, const struct timespec *tp)
645 Refer to clock_gettime() for the documentation
650 @capability Deferred @ref User::SetUTCTime(const TTime &aUTCTime)
653 @externallyDefinedApi
656 /** @fn nanosleep(const struct timespec *req, struct timespec *rem)
659 @return If the nanosleep system call returns because the requested time has elapsed, the value
660 returned will be zero. If rem is non- NULL, the timespec structure it references is updated to contain the
661 unslept amount (the request time minus the time actually slept).
663 The nanosleep system call
664 causes the process to sleep for the specified time.
665 Currently only microsecond sleep resolution can be obtained.
672 * Detailed description: Sample usage of nanosleep system call.
678 struct timespec tim, tim2;
681 if(nanosleep(&tim; , &tim2;) < 0 ) {
682 printf("Nano sleep system call failed
686 printf("Nano sleep successfull
694 Nano sleep successfull
703 @externallyDefinedApi
706 /** @fn clock_getcpuclockid(pid_t pid, clockid_t* clock_id)
710 Note: As Symbian OS exposes only 'wall clock time' at user level, only CLOCK_REALTIME
711 is supported for all the clock-based APIs. Any value for pid except "0" is considered as invalid
712 and for "0" the supported 'clock_id' i.e, CLOCK_REALTIME is returned.
714 Refer to clock_gettime() for the documentation
719 @externallyDefinedApi
722 /** @fn clock_nanosleep (clockid_t clock_id, int flags,
723 const struct timespec *rqtp, struct timespec *rmtp)
729 For full documentation, see http://www.opengroup.org/onlinepubs/009695399/functions/clock_nanosleep.html
731 Note: As Symbian OS exposes only 'wall clock time' at user level, only CLOCK_REALTIME
732 is supported for all the clock-based APIs.
735 @externallyDefinedApi
738 /** @fn asctime_r(const struct tm *tm, char *buf)
742 Refer to ctime() for the documentation
752 @externallyDefinedApi
755 /** @fn ctime_r(const time_t *clock, char *buf)
759 Refer to ctime() for the documentation
769 @externallyDefinedApi
772 /** @fn gmtime_r(const time_t *clock, struct tm *result)
776 Refer to ctime() for the documentation
786 @externallyDefinedApi
790 /** @fn localtime_r(const time_t *clock, struct tm *result)
794 Refer to ctime() for the documentation
804 @externallyDefinedApi
808 /** @fn strptime(const char * buf, const char * fmt, struct tm * tm)
812 @return Upon successful completion, strptime returns the pointer to the first character in buf that has not been required to satisfy the specified conversions in fmt .
813 It returns NULL if one of the conversions failed.
815 The strptime function parses the string in the buffer buf according to the string pointed to by fmt ,
816 and fills in the elements of the structure pointed to by tm .
817 The resulting values will be relative to the local time zone.
818 Thus, it can be considered the reverse operation of strftime .
820 The fmt string consists of zero or more conversion specifications and
822 All ordinary characters are matched exactly with the buffer, where
823 white space in the fmt string will match any amount of white space
825 All conversion specifications are identical to those described in strftime .
827 Two-digit year values, including formats \%y and \%D ,
828 are now interpreted as beginning at 1969 per POSIX requirements.
829 Years 69-00 are interpreted in the 20th century (1969-2000), years
830 01-68 in the 21st century (2001-2068).
832 If the fmt string does not contain enough conversion specifications to completely
833 specify the resulting struct tm ,
834 the unspecified members of tm are left untouched.
835 For example, if format is "\%H:\%M:\%S",
836 only tm_hour , tm_sec and tm_min will be modified.
837 If time relative to today is desired, initialize the tm structure with today's date before passing it to strptime .
850 locale = setlocale(LC_TIME,"en_GB.ISO-8859-1");
853 strptime("2001-11-12 18:31:01", "%Y-%m-%d %H:%M:%S", &tm;);
854 printf("sec = %d min = %d hours = %d
855 Year = %d Month = %d day = %d
857 tm.tm_sec,tm.tm_min,tm.tm_hour,tm.tm_year,tm.tm_mon,tm.tm_mday);
858 strftime(buf, sizeof(buf), "%d %B %Y %H:%M:%S", &tm;);
860 strptime("Mon","%a", &tm;);
861 strftime(buf, sizeof(buf), "%a", &tm;);
865 printf("Failed to set locale");
871 sec = 1 min = 31 hours = 18
872 Year = 101 Month = 10 day = 12
873 12 November 2001 18:31:01
883 Both the \%e and \%l format specifiers may incorrectly scan one too many digits
884 if the intended values comprise only a single digit
885 and that digit is followed immediately by another digit.
886 Both specifiers accept zero-padded values,
887 even though they are both defined as taking unpadded values.
889 The \%p format specifier has no effect unless it is parsed after hour-related specifiers.
890 Specifying \%l without \%p will produce undefined results.
898 The \%U and \%W format specifiers accept any value within the range 00 to 53
899 without validating against other values supplied (like month
900 or day of the year, for example).
902 The \%Z format specifier only accepts time zone abbreviations of the local time zone,
904 This limitation is because of ambiguity due to of the over loading of time
906 One such example is EST which is both Eastern Standard Time and Eastern Australia Summer Time.
908 The strptime function does not correctly handle multibyte characters in the fmt argument.
912 @externallyDefinedApi
915 /** @fn timer_create (clockid_t __clock_id,
916 struct sigevent *__restrict __evp,
917 timer_t *__restrict __timerid)
922 For full documentation, see http://www.opengroup.org/onlinepubs/009695399/functions/timer_create.html
924 Note: As Symbian OS exposes only 'wall clock time' at user level, only CLOCK_REALTIME
925 is supported for all the clock-based APIs.
931 @externallyDefinedApi
934 /** @fn timer_delete (timer_t __timerid)
937 For full documentation, see http://www.opengroup.org/onlinepubs/009695399/functions/timer_delete.html
943 @externallyDefinedApi
946 /** @fn timer_settime(timer_t __timerid, int __flags,
947 const struct itimerspec *__restrict __value,
948 struct itimerspec *__restrict __ovalue)
954 For full documentation, see http://www.opengroup.org/onlinepubs/009695399/functions/timer_settime.html
956 Note: This description also covers the timer_gettime() and timer_getoverrun() functions.
958 Note: As Symbian OS exposes only 'wall clock time' at user level, only CLOCK_REALTIME
959 is supported for all the clock-based APIs. At the user level, Symbian OS supports upto a
960 maximum of 1 ms resolution timer (RTimer::HighRes ()) upon which the timer emulation solution is based.
961 As the re-registrations for a periodic timer happen in the user mode, the timer expirations
962 might show up a possible unspecified latency.
967 * Detailed description:
975 void sighler (union sigval val)
977 printf("In the handler with val:%d\n", val.sival_int);
986 pthread_attr_init( &attr );
988 sig.sigev_notify = SIGEV_THREAD;
989 sig.sigev_notify_function = sighler;
990 sig.sigev_value.sival_int =20;
991 sig.sigev_notify_attributes = &attr;
993 if(0 == timer_create(CLOCK_REALTIME, &sig, &timerid))
995 struct itimerspec in, out;
997 in.it_value.tv_sec = 1;
998 in.it_value.tv_nsec = 0;
1000 in.it_interval.tv_sec = 0;
1001 in.it_interval.tv_nsec = 0;
1003 if(0 == timer_settime(timerid, 0, &in, &out))
1005 sleep(3); //wait for the timer expirations...
1009 printf("timer_settime () failed with err:%d\n", errno);
1012 timer_delete(timerid);
1016 printf("timer_create () failed with err:%d\n", errno);
1025 In the handler with val:20
1030 @see clock_gettime()
1033 @externallyDefinedApi
1036 /** @fn timer_gettime (timer_t __timerid, struct itimerspec *__value)
1040 For documentation refer to timer_settime().
1046 @externallyDefinedApi
1049 /** @fn timer_getoverrun (timer_t __timerid)
1052 For documentation refer to timer_settime().
1058 @externallyDefinedApi
1061 /** @def CLOCK_REALTIME
1063 This clock represents the realtime clock for the system.
1066 @externallyDefinedApi
1069 /** @def CLOCK_VIRTUAL
1071 This clock represents the amount of time (in seconds and nanoseconds) that the calling process has spent executing code in the user's context. It is a per-process clock. It cannot be set by the user.
1074 @externallyDefinedApi
1077 /** @def TIMER_ABSTIME
1082 @externallyDefinedApi
1087 Contains the following members,
1090 @externallyDefinedApi
1094 seconds after the minute
1098 minutes after the hour
1101 /** @var tm::tm_hour
1102 hours since midnight
1105 /** @var tm::tm_mday
1110 months since January
1113 /** @var tm::tm_year
1117 /** @var tm::tm_wday
1121 /** @var tm::tm_yday
1122 days since January 1
1125 /** @var tm::tm_isdst
1126 Daylight Savings Time flag
1129 /** @var tm::tm_gmtoff
1130 offset from UTC in seconds
1133 /** @var tm::tm_zone
1134 timezone abbreviation
1138 /** @fn time_t timegm(struct tm *tmp)
1143 This function is inverses for gmtime.
1144 Converts struct tm to time_t, assuming the data in tm is UTC rather than local timezone.
1152 @externallyDefinedApi