1 |
/* |
2 |
* libhfs - library for reading and writing Macintosh HFS volumes |
3 |
* Copyright (C) 2000 Klaus Halfmann <klaus.halfmann@feri.de>^ |
4 |
* Original 1996-1998 Robert Leslie <rob@mars.org> |
5 |
* other work 2000 from Brad Boyer (flar@pants.nu) |
6 |
* |
7 |
* The HFS+ dates are stored as UInt32 containing the number of seconds since |
8 |
* midnight, January 1, 1904, GMT. This is slightly different from HFS, |
9 |
* where the value represents local time. A notable exception is the |
10 |
* creationdate !. Linux uses times in GMT starting at January 1, 1970 |
11 |
* |
12 |
* This program is free software; you can redistribute it and/or modify |
13 |
* it under the terms of the GNU General Public License as published by |
14 |
* the Free Software Foundation; either version 2 of the License, or |
15 |
* (at your option) any later version. |
16 |
* |
17 |
* This program is distributed in the hope that it will be useful, |
18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 |
* GNU General Public License for more details. |
21 |
* |
22 |
* You should have received a copy of the GNU General Public License |
23 |
* along with this program; if not, write to the Free Software |
24 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 |
* |
26 |
*/ |
27 |
|
28 |
# ifdef HAVE_CONFIG_H |
29 |
# include "config.h" |
30 |
# endif |
31 |
|
32 |
#include "apple.h" |
33 |
#include "hfstime.h" |
34 |
|
35 |
/* return the given apple time as printable UNIX time */ |
36 |
char* get_atime(UInt32 atime) |
37 |
{ |
38 |
time_t t = atime; |
39 |
t -= HFSPTIMEDIFF; |
40 |
return ctime(&t); |
41 |
} |
42 |
|