1 #if !defined(lint) && !defined(DOS)
2 static char rcsid
[] = "$Id: adjtime.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
6 * ========================================================================
7 * Copyright 2013-2017 Eduardo Chappa
8 * Copyright 2006 University of Washington
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * ========================================================================
19 #include "../pith/headers.h"
20 #include "../pith/adjtime.h"
24 * MSC ver 7.0 and less times are since 1900, everybody else's time so far
25 * is since 1970. sheesh.
27 #if defined(DOS) && (_MSC_VER == 700)
28 #define EPOCH_ADJ ((time_t)((time_t)(70*365 + 18) * (time_t)86400))
32 * Adjust the mtime to return time since Unix epoch. DOS is off by 70 years.
39 tt
= time((time_t *)0);
50 get_adj_name_file_mtime(char *name
)
54 mtime
= name_file_mtime(name
);
57 if(mtime
!= (time_t)(-1))