Cast as Local Time Zone

(imported topic written by npeters91)

Ok, so I’ve got a simple fixlet I’m developing (in the begining stages), and I haven’t been able to figure something out.

I’d like the results to be cast in the local time zone.

See below…

times generated of records

whose

(

source of it = “F-PROT Antivirus”

and

description of it contains “infected with”

)

of application event log as local time

(imported comment written by jessewk)

All of the application events on my machine appear to be local time, but maybe that’s not the case for you.

You can use this (omitting the whose clause for clarity):

local times ((it as string) of times generated of records of application event log)

That will output:

Sun, 12 Nov 2006 17:22:57 -1500
Sun, 12 Nov 2006 17:22:57 -1500
Sun, 12 Nov 2006 17:22:58 -1500
Sun, 12 Nov 2006 17:23:00 -1500

If you don’t mind losing the date information, you can do this:

times (local time zone) of times generated of records of application event log

Which gives output like this:

17:22:56 -1500
17:22:57 -1500
17:22:57 -1500
17:22:57 -1500
17:22:57 -1500
17:22:58 -1500
17:23:00 -1500

(imported comment written by npeters91)

Thank you for your help…

I tried the above suggestion, but my times are showing different than my local time zone on my computer, while evaluating in the relevance debugger.

Maybe I’m reading the time zone variable incorrectly.

I’m eastern US time (-0500) <- I think?

Here is my output:

Mon, 05 Mar 2007 16:14:59 -0900

Mon, 05 Mar 2007 16:15:00 -0900

Tue, 06 Mar 2007 09:24:12 -0900

Tue, 06 Mar 2007 09:24:12 -0900

Wed, 07 Mar 2007 07:58:52 -0900

Wed, 07 Mar 2007 07:58:52 -0900

Thu, 08 Mar 2007 14:05:13 -0900

Thu, 08 Mar 2007 14:05:13 -0900

Fri, 09 Mar 2007 08:29:07 -0900

Fri, 09 Mar 2007 08:29:07 -0900

Mon, 23 Apr 2007 09:30:48 -0900

Mon, 23 Apr 2007 09:31:02 -0900

Mon, 23 Apr 2007 09:31:17 -0900

(imported comment written by npeters91)

Ok I see a difference in the Relevance Debugger version that I’m using…

Although both show incorrect time zones…

In version 1.0.0.4:

Mon, 05 Mar 2007 21:14:59 -0400

Mon, 05 Mar 2007 21:15:00 -0400

In version 2.0:

Mon, 05 Mar 2007 16:14:59 -0900

Mon, 05 Mar 2007 16:15:00 -0900

Which Relevance Debugger should I be using?

Thanks

(imported comment written by jessewk)

You are correct, there is a bug involving incorrect time zones in the version of the relevance debugger currently posted on the support site. We will post a new version shortly and I will let you know here when it is available.

-Jesse

(imported comment written by jessewk)

The new version has been posted. http://support.bigfix.com/fixlet