Gentoo Archives: gentoo-user

From: Jack <ostroffjh@×××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Converting Unix time to local time
Date: Mon, 23 Nov 2020 17:39:00
Message-Id: 1e9f95f6-1433-5b02-b8bc-ca3567715a76@users.sourceforge.net
In Reply to: [gentoo-user] Converting Unix time to local time by Dr Rainer Woitok
1 On 11/23/20 12:28 PM, Dr Rainer Woitok wrote:
2 > Greetings,
3 >
4 > looking for a small, fast utility (preferably written in C) accepting a
5 > Unix time (seconds since 1970-01-01) as argument and printing the corr-
6 > esponding local time to standard output.
7 >
8 > Any pointers?
9 >
10 > Sincerely,
11 > Rainer
12
13 I'm not aware of any already existing programs, but considering it would
14 only take few lines of code, check localtime() to convert a time_t
15 unixtime to a struct tm broken down time, and strftime() to convert to a
16 string with your chosen format.

Replies

Subject Author
Re: [gentoo-user] Converting Unix time to local time tedheadster <tedheadster@×××××.com>