Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Newsgroups | comp.lang.c |
|---|---|
| Subject | Re: mktime |
| References | <87vccf1clw.fsf@huddi.jernurt.dk> <k9qcil$oh$1@dont-email.me> <lnobi7ortk.fsf@nuthaus.mib.org> |
| From | Anders Wegge Keller <wegge@wegge.dk> |
| Date | 2012-12-06 21:37 +0100 |
| Message-ID | <87hany29ze.fsf@huddi.jernurt.dk> (permalink) |
| Organization | SunSITE.dk - Supporting Open source |
Keith Thompson <kst-u@mib.org> writes: > Eric Sosman <esosman@comcast-dot-net.invalid> writes: > [...] > > Clearly, the intent is to relieve the programmer of the burden > > of all that date arithmetic. If you've got a struct tm representing > > some time T and you want to determine the time at T plus 01:23:45, > > you can blithely add 1*3600+23*60+45 to the tm_sec field and call > > mktime(), and mktime() will figure things out. > [...] > > Or you can add 1 to tm_hour, 23 to tm_min, and 45 to tm_sec, and let > mktime() figure *everything* out. Yep :) I should have thought about this possibility 10 years ago, and spared myself a lot of trouble. -- /Wegge Leder efter redundant peering af dk.*,linux.debian.*
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
mktime Anders Wegge Keller <wegge@wegge.dk> - 2012-12-06 15:25 +0100
Re: mktime James Kuyper <jameskuyper@verizon.net> - 2012-12-06 09:53 -0500
Re: mktime Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-06 10:11 -0500
Re: mktime Anders Wegge Keller <wegge@wegge.dk> - 2012-12-06 17:40 +0100
Re: mktime Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-06 14:20 -0500
Re: mktime Keith Thompson <kst-u@mib.org> - 2012-12-06 12:28 -0800
Re: mktime Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-06 17:36 -0500
Re: mktime Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-06 17:42 -0500
Re: mktime Keith Thompson <kst-u@mib.org> - 2012-12-06 12:20 -0800
Re: mktime Anders Wegge Keller <wegge@wegge.dk> - 2012-12-06 21:37 +0100
Re: mktime "Heinrich Wolf" <invalid@invalid.invalid> - 2012-12-07 09:48 +0100
Re: mktime James Kuyper <jameskuyper@verizon.net> - 2012-12-07 08:08 -0500
Re: mktime "christian.bau" <christian.bau@cbau.wanadoo.co.uk> - 2012-12-07 09:23 -0800
Re: mktime James Kuyper <jameskuyper@verizon.net> - 2012-12-07 13:14 -0500
Re: mktime Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-07 13:46 -0500
Re: mktime "Heinrich Wolf" <invalid@invalid.invalid> - 2012-12-07 19:59 +0100
Re: mktime Robert Wessel <robertwessel2@yahoo.com> - 2012-12-07 15:50 -0600
Re: mktime "Heinrich Wolf" <invalid@invalid.invalid> - 2012-12-07 21:39 +0100
Re: mktime Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-07 17:17 -0500
Re: mktime Keith Thompson <kst-u@mib.org> - 2012-12-07 17:50 -0800
Re: mktime Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-08 08:34 -0500
Re: mktime pacman@kosh.dhis.org (Alan Curry) - 2012-12-07 22:44 +0000
Re: mktime "Heinrich Wolf" <invalid@invalid.invalid> - 2012-12-08 10:31 +0100
Re: mktime pacman@kosh.dhis.org (Alan Curry) - 2012-12-08 20:50 +0000
Re: mktime "Heinrich Wolf" <invalid@invalid.invalid> - 2012-12-09 11:39 +0100
Re: mktime pacman@kosh.dhis.org (Alan Curry) - 2012-12-09 19:47 +0000
Re: mktime "Heinrich Wolf" <invalid@invalid.invalid> - 2012-12-10 09:51 +0100
Re: mktime sla29970@gmail.com - 2012-12-09 08:41 -0800
csiph-web