GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
caltime(3) FreeBSD Library Functions Manual caltime(3)

caltime - calendar dates and times

#include <caltime.h>

unsigned int caltime_fmt(s,&ct);
unsigned int caltime_scan(s,&ct);

struct caltime ct;
char *s;

A struct caltime value is a calendar date and time with an offset in minutes from UTC. It has five components: date (a struct caldate), hour (0...23), minute (0...59), second (0...60), and offset (-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 struct caltime with date containing 1997, 6, 30; hour 19; minute 59; second 60; and offset -240 (4 hours).

caltime_fmt prints ct 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 caltime_fmt returns the number of characters that would have been printed.

caltime_scan reads a calendar date, time, and offset in ISO style from the beginning of the character buffer s and puts them into ct. It returns the number of characters read. If s does not start with an ISO-style date and time (including offset), caltime_scan returns 0.

caltime_tai(3), caldate(3), tai(3)

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.