Solved

event log reading

Posted on 2001-07-02
13
485 Views
Last Modified: 2013-11-13
i success to read the event log for windows NT using a visual basic program
but the problem is in the eventlogrecord data type because the time it contains is the gloabal time. how can i get the time in my country?
knowing that due to the day light some times the differ between my local time and GMT is 2 or 3 hours
0
Comment
Question by:aft
  • 6
  • 2
  • 2
  • +3
13 Comments
 
LVL 22

Expert Comment

by:CJ_S
Comment Utility
I assume that there is some sort of connection between both computers.

First grab the time on both the NT machine and your machine (I just distinguish between them). Fetch the times on both machines (GetLocalTime API). Then use the DateDiff function to check how much hours are in between them. Then use the DateAdd function with the difference to get the correct time:

'assume date1 and date2 are both filled
difference = DateDiff("h", date1, date2)
date1 = DateAdd("h", difference, date1)

date1 now contains the correct time.

Just fiddle around with it.

regards,
CJ
0
 

Author Comment

by:aft
Comment Utility
no u disuss completly another problem than mine
0
 

Author Comment

by:aft
Comment Utility
no u disuss completly another problem than mine
who said about multi computer
the problem is in the time returned when reading the event log of windows NT
0
 
LVL 22

Expert Comment

by:CJ_S
Comment Utility
Should be the system time when that certain event occured... I guess I do not understand the problem.



Regards,
CJ
0
 
LVL 2

Accepted Solution

by:
MadYugoslav earned 10 total points
Comment Utility
You can use (windows base services) functions:
GetSystemTime and GetLocalTime to determine adjucement for time in event log.
0
 

Author Comment

by:aft
Comment Utility
i success to read the event log for windows NT using a visual basic program
but the problem is in the eventlogrecord data type because the time it can retrived contains the gloabal time.
how can i get the time in my country?
knowing that due to the day light some times the differ between my local time and GMT is 2 or 3 hours
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:aft
Comment Utility
how can obtain a complete description of the all events numbers that are in the event viewer
0
 
LVL 3

Expert Comment

by:FlamingSword
Comment Utility
Problem seems clear enough. Either need VB assistance or a switch/option on the Windows DeskTop. Not my turf. VB shows on screen as #1 discussed topic. Likely get better answer there.
0
 

Author Comment

by:aft
Comment Utility
i know i do not want any vb help
i need a documentation about the events id of all events of the windows NT event viewer
0
 

Author Comment

by:aft
Comment Utility
i success to read the event log for windows NT using a visual basic program
but the problem is in the eventlogrecord data type because the time it contains which retrived from the event log is the gloabal time (grinitish time).
how can i get the time in my country?
knowing that due to the day light sometimes the differ between my local time and GMT is 2 or 3 hours
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
It's time to clean up this topic area and that means taking care of this question. Your options at this point are:
 
1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.
 
2. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
3.  Ask Community Support to help split points between participating experts.  Just comment here with details.
 
4.  Delete the question because it is of no value to you or to anyone else.  To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
If you elect for option 2, 3 or 4, just post comment with details here and I'll take it from there.  We also request that you review any other open questions you might have and update/close them.  Display all your question history from your Member Profile to view details.
 
PLEASE DO NOT AWARD THE POINTS TO ME.
 
____________________________________________
 
 
 
Hi Experts:
 
In the event that the Asker does not respond, I would very much appreciate your opinions as to which Expert ought to receive points (if any) as a result of this question.  Likewise, you can also suggest that I PAQ or delete the question.
 
Experts, please do not add further "answer" information to this question.  I will be back in about one week to finalize this question.
 
Thank you everyone.
 
Moondancer :)
Community Support Moderator @ Experts Exchange
 
P.S.  Engineering has been advised about the error in the comment date/time sort order.
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Please click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20113404.html
http://www.experts-exchange.com/questions/Q.20117832.html
http://www.experts-exchange.com/questions/Q.20122444.html
http://www.experts-exchange.com/questions/Q.20124456.html
http://www.experts-exchange.com/questions/Q.20140329.html
http://www.experts-exchange.com/questions/Q.20143536.html
http://www.experts-exchange.com/questions/Q.20144408.html
http://www.experts-exchange.com/questions/Q.20146151.html
http://www.experts-exchange.com/questions/Q.20140645.html
http://www.experts-exchange.com/questions/Q.20164994.html
http://www.experts-exchange.com/questions/Q.20170961.html
http://www.experts-exchange.com/questions/Q.20187364.html
http://www.experts-exchange.com/questions/Q.20244704.html
http://www.experts-exchange.com/questions/Q.20244702.html




PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0
 
LVL 5

Expert Comment

by:Netminder
Comment Utility
Admin notified of User neglect. Force-accepted by
Netminder
CS Moderator
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

This is an explanation of a simple data model to help parse a JSON feed
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now