Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Fri Mar 29, 2024 12:56 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
PostPosted: Wed Jul 16, 2008 9:25 am 
Offline
Helper

Joined: Fri Nov 16, 2007 1:32 am
Posts: 73
Location: Dallas,Texas
I figure this is done within the PHP code somewhere.

Say for system_last_boot or even last_audit

the data is put into the database as YYYYMMDDHHMMSS
but then durning the query screens it comes out as:
2008-05-02 14:05


I put in the database some cutom data as YYYYMMDDHHMMSS and I want the PHP code to do the same formatting but dont know where to look.

Thanks

_________________
1400 Servers Audited (1 hour interval) Applied via a local scheduler, deployed via GPO.
Running OA on IIS6 Web Server
90% Windows 2k3 Server (std,ent)
5% Windows XP
5% Windows 2000


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 18, 2008 12:19 am 
Offline
Contributor

Joined: Fri Jul 04, 2008 6:46 am
Posts: 153
Location: USA - WI
I would be interested in knowing too. I've made a quick and easy form for manually entering other devices but I cannot seem to get the timestamp format correct so that it displays properly when you view other items in OA.

I just briefly tried to look at how OA does it, and it looks lilke the time stamp is generated from the following lines in the audit.vbs file...

dim dt : dt = Now()
timestamp = Year(dt) & Right("0" & Month(dt),2) & Right("0" & Day(dt),2) & Right("0" & Hour(dt),2) & Right("0" & Minute(dt),2) & Right("0" & Second(dt),2)

Then it looks like the timestamp is then entered by doing a trim from like...

$timestamp = trim($extended[2]);

Then it is inserted into the database from that $timestamp variable with a mysql query.

I'm guessing some variation of the now() function in mysql could generate the correct timestamp format that OA is looking for, I'm just not sure exactly how it is done.

_________________
OA Server: Debian Squeeze w/ Apache2
Auditing: 700 Workstations, 250 or so Retail Terminals, about 75 Servers
OS's: Windows XP/2003/2008/2008 R2/Vista/7, Debian
LDAP: Active Directory 2008 R2


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 18, 2008 12:36 am 
Offline
Open-AudIT Fellow

Joined: Thu May 17, 2007 5:47 pm
Posts: 568
Location: Italy
You don't need to modify audit.vbs, just add your custom field(s) to the function "special_field_converting" in include_functions.php (return_date or return_date_time as needed)

_________________
Edoardo


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group