The Alarm Time

SandUhr User's Guide
Prev |  | Next

# Chapter 3. The Alarm Time

SandUhr's main use is to wait until a specified alarm time. You tell this time to the program with the help of a time string, either as a command line argument or entered into the dialog window. There are two fundamentally different ways to specify the alarm time. You may specify the length of the alarm period or you may specify the point of time when the alarm should occur.

Relative time specifications give the length of the time interval. They always start with a `+` sign, which is followed by the intervall's length. Examples are `+30s` (wait for 30 seconds) and `+1h30m` (one hour and a half). The following abbreviations are used.

`d`, `days`

  follows the number of complete days.

`h`, `hours`

  the number of hours

`m`, `min`

  minutes

`s`, `sec`

  seconds

Absolute time specifications directly give the alarm time. They always start with a digit. Examples are `20:15` (a quarter past eight in the evening) and `2003-12-31 23:59:59` (the very end of the year 2003).

> Tip: As the preceding example illustrates, absolute time specifications may include spaces. When entering these on the command line, you have to enclose the whole expression within double quotes, to prevent the shell from splitting it.

Example 3-1. A command line argument including spaces

    % sanduhr "1999-12-31 23:59:30"

The syntax for absolute time specifications is

    [year-month-day] hour:minute[:second],

where `year` is a four-digit number, the `month` is in the range 1 through 12, the `day` of the month is in the range 1 through 31, `hour` is the number of hours past midnight, in the range 0 through 23, and the `minute` and the `second` are in the range `0' through `59'.

Prev | Home | Next
Starting SandUhr |  | Preferences