Marcos Lorenzo de Santiago <[EMAIL PROTECTED]> wrote:
> Anyone knows if it exists any builtin function or any other way > to get the system date with GNU format? I believe that the output of the time () function is what you want. Do not conclude that it is two hours off because CygWin prints 16:04 when your clock says 18:04. What this means is that CygWin and Perl do not know what time zone you are in. The output of C:\>perl -e "print scalar gmtime 1018541088" Thu Apr 11 16:04:48 2002 C:\>perl -e "print scalar localtime 1018541088" Thu Apr 11 12:04:48 2002 C:\>rem I'm in time zone -5, but it's summer time here. suggests that Perl and CygWin think you are in time zone 0. The thing is, the output of "time /t" suggests your net time zone is -2. I thought Spain was -1, but summer time should bring it back to 0. If you're actually in Spain, you might want to check your date/time control panel, and see what time zone it thinks you're in. Also, you might want to see if you have the TZ environment variable defined incorrectly. If so, either define it correctly or get rid of it. Perl and CygWin (both being Unix-y kinds of things) pay attention to this, but Windows native code frequently does not. This messed me up badly last November. > is there a module with functions that compare dates? Well, if you can solve the two-hour offset problem, just do an arithmetic comparison of the numeric value of the time. Other subroutines/modules to look at are: localtime, gmtime (in core Perl) Time::Local (undoes localtime and gmtime) Date::Manip (maybe overkill) Tom Wyant _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
