Returns information about the local time configured on a computer.

This script was tested using Python 2.2.2-224 for Microsoft Windows, available from ActiveState.

import win32com.client
strComputer = "."
objWMIService = win32com.client.Dispatch("WbemScripting.SWbemLocator")
objSWbemServices = objWMIService.ConnectServer(strComputer,"root\cimv2")
colItems = objSWbemServices.ExecQuery("Select * from Win32_LocalTime")
for objItem in colItems:
    print "Day: ", objItem.Day
    print "Day Of Week: ", objItem.DayOfWeek
    print "Hour: ", objItem.Hour
    print "Milliseconds: ", objItem.Milliseconds
    print "Minute: ", objItem.Minute
    print "Month: ", objItem.Month
    print "Quarter: ", objItem.Quarter
    print "Second: ", objItem.Second
    print "Week In Month: ", objItem.WeekInMonth
    print "Year: ", objItem.Year