+ Post New Thread
Results 1 to 8 of 8
Windows Thread, Windows XP SP3 change to Date/Time format in Technical; I log all logins in to a text file purely to make it easier on myself when I need to ...
  1. #1

    Join Date
    Apr 2008
    Posts
    64
    Thank Post
    10
    Thanked 2 Times in 2 Posts
    Rep Power
    14

    Windows XP SP3 change to Date/Time format

    I log all logins in to a text file purely to make it easier on myself when I need to find where someone has logged in. I didn't notice the change until a few days afterwards and it took me a few days to work out exactly what I had done that made this change - I'm still not sure WHY it made this change.
    To see an example of the format of the text file I log to please see the code snippet below;
    Code:
     Set WshNetwork = WScript.CreateObject("WScript.Network") 
    msgbox(ucase(WshNetwork.ComputerName) & "	" & lcase(WshNetwork.UserName) & "	" & WeekdayName(Weekday(Date)) & "	" & Date & "	" & Time)
    The first example here is with SP3 installed;
    Code:
    mypc       myusername   Thursday        7/10/2008       1:00:35 PM
    This example here is after uninstalling SP3;
    Code:
    mypc       myusername   Thursday        10/07/2008      13:19:20
    So SP3 seems to americanize the date and time?

    I have no idea why this change happened, as far as I can tell there were no changes at all to Regional/Locale options and I don't see reference in the SP3 notes for such a change either.
    I was looking to deploy SP3 this summer with SCCM (SMS Successor for those that are not aware) but I am not happy about this change.

    Anyone have any ideas? or anyone noticed any other anomalies with SP3?

  2. #2

    Join Date
    Feb 2006
    Location
    Derbyshire
    Posts
    1,381
    Thank Post
    181
    Thanked 211 Times in 171 Posts
    Rep Power
    65
    I have SP3 installed on my machine here - not rolled it out in the school yet, but copying your script to a VBS file to test I do not get the same results as you. My time is in 24 hour format (but I do not have a previous to compare to) but my date has remained in UK format - ie it is showing 11/07/2008.

    If you check your "Regional and Language Options" in the control panel, does it still show your preferred date formats correctly?

  3. #3

    Join Date
    Apr 2008
    Posts
    64
    Thank Post
    10
    Thanked 2 Times in 2 Posts
    Rep Power
    14
    Interesting!
    How did you install SP3? from Windows Update?

    Yes Regional & Language Options show date formats exactly how I expect them to be shown, they just don't get shown that way!
    I see the same incorrect format using net time too

  4. #4
    jammers's Avatar
    Join Date
    Nov 2007
    Location
    Lincoln
    Posts
    20
    Thank Post
    4
    Thanked 3 Times in 2 Posts
    Rep Power
    15
    Just tried it my date is in UK format with SP3 installed

  5. #5

    Join Date
    Apr 2008
    Posts
    64
    Thank Post
    10
    Thanked 2 Times in 2 Posts
    Rep Power
    14
    I have repeated this a few times with other PCs here and I have exactly the same problem with each of them. Am I missing something?

  6. #6

    Join Date
    Feb 2006
    Location
    Derbyshire
    Posts
    1,381
    Thank Post
    181
    Thanked 211 Times in 171 Posts
    Rep Power
    65
    Try adding

    SetLocale(2057)

    to the start of your VBScript (assuming you're in the UK)

    Used to be a problem with ASP pages etc when something went quirky. Seems to be compounded in SP3 - but forcing the locale in the script should fix it.

    Edit - after a bit of trawling, check out the MS KB article Script output is not displayed as expected when you run VBScript or JScript scripts in Windows Vista Service Pack 1, in Windows Server 2008, or in Windows XP Service Pack 3. Hotfix on the way apparently - but their workaround is the same, just use setlocale for the moment.
    Last edited by OutToLunch; 11th July 2008 at 12:09 PM. Reason: Add MS KB link

  7. #7

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,157
    Thank Post
    116
    Thanked 529 Times in 452 Posts
    Blog Entries
    2
    Rep Power
    124
    The other thing to do is to force the date you write to the file to be in a "universal" format - something like:

    Code:
    ofile.writeline year(now) & "-" & right("0" & month(now),2) & "-" & right("0" & day(now),2) & " " & right("0" & hour(now),2) & ":" & right("0" & minute(now),2)
    - gives things like "2008-07-11 12:10" which is easy to work with (you can insert it into spreadsheets and databases in any regional format and it will be "right")

  8. #8

    Join Date
    Feb 2006
    Location
    Derbyshire
    Posts
    1,381
    Thank Post
    181
    Thanked 211 Times in 171 Posts
    Rep Power
    65
    XP Hotfix seems to be here - http://www.microsoft.com/downloads/d...DisplayLang=en despite the KB article saying it's under development. Hope this sorts you out!

SHARE:
+ Post New Thread

Similar Threads

  1. Windows XP SP3 Cannot tell the time.
    By FN-GM in forum Scripts
    Replies: 25
    Last Post: 14th May 2008, 10:36 PM
  2. set date and time BTech exam
    By Outpost in forum How do you do....it?
    Replies: 2
    Last Post: 19th March 2008, 12:21 PM
  3. [CLOSED] Bug/Error: Date/Time is wrong.
    By contink in forum EduGeek.net Site Problems
    Replies: 2
    Last Post: 3rd March 2008, 02:44 PM
  4. Format of Squid log time stamp
    By ITWombat in forum Web Development
    Replies: 6
    Last Post: 2nd July 2006, 07:36 PM
  5. Change folder creation date
    By ajbritton in forum Windows
    Replies: 8
    Last Post: 16th November 2005, 04:59 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •