Deans, Glenn (IT Solutions US) wrote:
> Can anyone give me some direction for handling the UTC Coded time?  I
> think I'm just missing something obvious, but I just can't get this into
> a useable format for doing any kind of date math.

I know nothing of ADO, but given an epoch time or a UTC time, it shouldn't
be that hard to convert.  You'll need to find out why you're getting the
strange value for $modified back before you can fix it though.

>       until ($recset->EOF){
>               $modified = $recset->Fields('modifyTimeStamp')->Value;
>               print "Modified=$modified\n";
>               # displays 
>               $recset->MoveNext;
>       }
> 
> It seems any dates from last year come out as 1/9/2009 2:22:05 AM.  I'm
> not sure what I'm doing wrong, but maybe someone could point it out to
> me?  Then once that is corrected, how can you easily tell if it's > 90
> days since it doesn't seem to be an epoch time?

Once you have your times in epoch format, it's just simple math to check
for 90 days (90 * 86400 seconds) difference.

Are you literally getting '1/9/2009 2:22:05 AM' back for $modified ?

If so, I have no idea why.  I would expect a string like '20090203164851Z'
which you can easily parse into pieces and feed to Time::Local::timegm to
get epoch time.

If not, what are you literally getting ?
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to