caltime(3) caltime(3) NNAAMMEE caltime - calendar dates and times SSYYNNTTAAXX ##iinncclluuddee <> unsigned int ccaallttiimmee__ffmmtt(_s,&_c_t); unsigned int ccaallttiimmee__ssccaann(_s,&_c_t); struct caltime _c_t; char *_s; DDEESSCCRRIIPPTTIIOONN A ssttrruucctt ccaallttiimmee value is a calendar date and time with an offset in minutes from UTC. It has five components: ddaattee (a ssttrruucctt ccaallddaattee), hhoouurr (0...23), mmiinnuuttee (0...59), sseeccoonndd (0...60), and ooffffsseett (-5999...5999). For example, a leap second occurred on 30 June 1997 at 23:59:60 UTC. The local time in New York was 30 June 1997 19:59:60 -0400. This local time is represented inside a ssttrruucctt ccaallttiimmee with ddaattee containing 1997, 6, 30; hhoouurr 19; mmiinnuuttee 59; sseeccoonndd 60; and ooffffsseett -240 (4 hours). FFOORRMMAATTTTIINNGG ccaallttiimmee__ffmmtt prints _c_t in ISO style (yyyy-mm-dd hh:mm:ss +oooo) into the character buffer _s, without a terminating NUL. It returns the number of characters printed. _s may be zero; then ccaallttiimmee__ffmmtt returns the number of characters that would have been printed. ccaallttiimmee__ssccaann reads a calendar date, time, and offset in ISO style from the beginning of the character buffer _s and puts them into _c_t. It returns the number of characters read. If _s does not start with an ISO-style date and time (including offset), ccaallttiimmee__ssccaann returns 0. SSEEEE AALLSSOO caltime_tai(3), caldate(3), tai(3) caltime(3)