1 .\" Copyright (c) 2016 The FreeBSD Foundation. All rights reserved.
3 .\" This documentation was written by Ed Maste under sponsorship of
4 .\" the FreeBSD Foundation.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" This software is provided by the author and contributors ``as is'' and
16 .\" any express or implied warranties, including, but not limited to, the
17 .\" implied warranties of merchantability and fitness for a particular purpose
18 .\" are disclaimed. In no event shall the author or contributors be liable
19 .\" for any direct, indirect, incidental, special, exemplary, or consequential
20 .\" damages (including, but not limited to, procurement of substitute goods
21 .\" or services; loss of use, data, or profits; or business interruption)
22 .\" however caused and on any theory of liability, whether in contract, strict
23 .\" liability, or tort (including negligence or otherwise) arising in any way
24 .\" out of the use of this software, even if advised of the possibility of
34 .Nd return the current or environment-provided timestamp
41 .Fa "time_t *timestamp"
46 function returns a timestamp supplied by the
48 environment variable, or the current time provided by
50 if the environment variable is not set.
54 argument specifies a pointer to the location where the timestamp will be
59 returns 0 on success, and -1 in the event of an error.
63 function may fail with the following errors:
64 .Bl -tag -width ".Bq Er ERANGE"
67 contains invalid characters.
70 specifies a negative value or a value that cannot be stored in a
75 function may also fail for any of the reasons described in