6 * Copyright (C) 2012, 2013 Eric Biggers
8 * This file is part of wimlib, a library for working with WIM files.
10 * wimlib is free software; you can redistribute it and/or modify it under the
11 * terms of the GNU General Public License as published by the Free
12 * Software Foundation; either version 3 of the License, or (at your option)
15 * wimlib is distributed in the hope that it will be useful, but WITHOUT ANY
16 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
17 * A PARTICULAR PURPOSE. See the GNU General Public License for more
20 * You should have received a copy of the GNU General Public License
21 * along with wimlib; if not, see http://www.gnu.org/licenses/.
28 #include "wimlib/types.h"
29 #include "wimlib/timestamp.h"
35 get_wim_timestamp(void)
38 gettimeofday(&tv, NULL);
39 return timeval_to_wim_timestamp(tv);
43 wim_timestamp_to_str(u64 timestamp, tchar *buf, size_t len)
46 time_t t = wim_timestamp_to_unix(timestamp);
48 tstrftime(buf, len, T("%a %b %d %H:%M:%S %Y UTC"), &tm);