Scroll to navigation

sttime(3) ShapeTools Toolkit Library sttime(3)

NAME

stMktime, stWriteTime - date and time handling

SYNOPSIS

#include <config.h>
#include <sttk.h.h>

time_t stMktime (char *string);

char* stWriteTime (time_t date);

DESCRIPTION

stMktime scans the given string and tries to read a date and time from it. It understands various formats of date strings. The following is a list of all valid formats, optional parts in brackets.

[Tue] Jan 5[,] [19]93
This includes the standard asctime(3) format.
With no year given, the year defaults to the current year.
[19]93/01/05
This notation requires month and day represented by exactly two digits.
5.1.[19]93
This is the usual German notation.
5.1.
German notation referencing the current year.

A certain time, given together with the date must always have the following form.

Each of the fields must be an integer value within the proper range (hours: 0-23, minutes and seconds: 0-59). Values below 10 may be written as one digit numbers.

The time value may be placed anywhere in the date string: at the beginning, at the end, or somewhere in the middle. Any amount of whitespace may be given between a field of the time value and the separating colon. The time is always considered to be local time.

stWriteTime generates a time string similar to asctime(3) from its date argument.

SEE ALSO

asctime(3)

BUGS

Time Zone Names within the time string (like `MET') are not handled properly. In most cases they will cause a failure.

Thu Jun 24 17:43:35 1993 sttk-1.7