On Tue, Oct 14, 2008 at 12:43:54PM -0400, Mark B. wrote:
> I can't figure out from the man pages why
> mktime() is giving a different result than date -f.
> Both strptime and mktime are supposed to use the
> local timezone, as does date.
> 
> The output of date is correct; mktime() is an hour later.
>
> What am I missing here?

I'm betting it's due to DST

I believe you have to do the math yourself if tm_isdst is non-zero.
Otherwise, consider using functions like ctime() and others (which are
also POSIX compliant).

-- 
| Jeremy Chadwick                                jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to