2 * Copyright 1995, 1996 Perforce Software. All rights reserved.
4 * This file is part of Perforce - the FAST SCM System.
8 * DateTime - get and set the date as a string
11 // size for Fmt, FmtDay, FmtTz
13 # define DateTimeBufSize 20
18 int Compare( const DateTime
&t2
) const { return tval
- t2
.tval
; };
20 void Fmt( char *buf
) const;
21 void FmtDay( char *buf
) const;
22 void FmtTz( char *buf
) const;
23 void FmtElapsed( char *buf
, const DateTime
&t2
);
24 void Set( const char *date
, Error
*e
);
25 void Set( const int date
) { tval
= (time_t)date
; }
28 int Value() const { return tval
; }
29 int Tomorrow() const { return tval
+ 24*60*60; }
30 int IsWholeDay() const { return wholeDay
; }
32 // for stat() and utime() conversion
34 static time_t Localize( time_t centralTime
);
35 static time_t Centralize( time_t localTime
);