Re: [Arsperl-users] arsperl date/time value
Brought to you by:
jeffmurphy
|
From: K P <kp...@ya...> - 2005-04-28 20:59:54
|
oops had some other stuff in there from the copy/paste of code I had... ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $year += 1900; $mon++; my($timestamp) = mktime(0, 0, 0, $day, $month, $year); there that's better. --- K P <kp...@ya...> wrote: > try: > ($sec1,$min1,$hour1,$mday1,$mon1,$year1,$wday1,$yday1,$isdst1) > = localtime(time-86400); > > $year1 += 1900; $mon1++; > > my($timestamp) = mktime(0, 0, 0, $day, $month, > $year); > > Hope this helps. > > --- "Meier, Lori" <lor...@ci...> wrote: > > > > Hello, > > > > I'm a newbie to perl/arsperl. I am able to create > > tickets, however, > > the date/time values that I pass are all set back > to > > 12/31/1969 7:00:01. > > > > I've read that I need to use mktime, but I'm > pretty > > clueless on how to use it. > > > > Does anyone have an example of using the mktime > > function to convert > > the time so that I get the correct time and not > > 12/31/1969 7:00:01? > > > > Thanks, > > Lori > > > > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: Tell us your > software > > development plans! > > Take this survey and enter to win a one-year sub > to > > SourceForge.net > > Plus IDC's 2005 look-ahead and a copy of this > survey > > Click here to start! > > http://www.idcswdc.com/cgi-bin/survey?id5hix > > _______________________________________________ > > Arsperl-users mailing list > > Ars...@ar... > > > https://lists.sourceforge.net/lists/listinfo/arsperl-users > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Tell us your software > development plans! > Take this survey and enter to win a one-year sub to > SourceForge.net > Plus IDC's 2005 look-ahead and a copy of this survey > Click here to start! > http://www.idcswdc.com/cgi-bin/survey?id=105hix > _______________________________________________ > Arsperl-users mailing list > Ars...@ar... > https://lists.sourceforge.net/lists/listinfo/arsperl-users > __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ |