6 * Copyright (C) 2012, 2013 Eric Biggers
8 * This file is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU Lesser General Public License as published by the Free
10 * Software Foundation; either version 3 of the License, or (at your option) any
13 * This file is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this file; if not, see http://www.gnu.org/licenses/.
26 #include "wimlib/types.h"
27 #include "wimlib/timestamp.h"
33 get_wim_timestamp(void)
36 gettimeofday(&tv, NULL);
37 return timeval_to_wim_timestamp(tv);
41 wim_timestamp_to_str(u64 timestamp, tchar *buf, size_t len)
44 time_t t = wim_timestamp_to_unix(timestamp);
46 tstrftime(buf, len, T("%a %b %d %H:%M:%S %Y UTC"), &tm);