Absent Member.. Omri_Ziv_1 Absent Member..
Absent Member..
546 views

Discover GMT Time Zone of Host

How can I discover the specific GMT Time Zone defined for a windows host ?

 

how can I discover whether the System clock automatically change  for Daylight saving time using uCMDB ?

 

Thanks,

Omri


________________________________________________
Maximum performance with minimum resources over time.
Tags (3)
0 Likes
3 Replies
Rutger Honored Contributor.
Honored Contributor.

Re: Discover GMT Time Zone of Host

Suggestion: using WMI get DaylightName and StandardName from W32_Timezone object.

0 Likes
Absent Member.. Omri_Ziv_1 Absent Member..
Absent Member..

Re: Discover GMT Time Zone of Host

is there a built-in functionality for this feature within uCMDB or do I need to create a script for it ?


________________________________________________
Maximum performance with minimum resources over time.
0 Likes
Rutger Honored Contributor.
Honored Contributor.

Re: Discover GMT Time Zone of Host

Yes I think so. Add extra attributes to your Windows CIT and then add a script to your WMI host resources discovery. Something like this:

 

import logger
import modeling
import memory

def executeWmiQuery(client, OSHVResult):
    '''Client, ObjectStateHolderVector
    @command: select DaylightName, StandardName from Win32_Timezone
    '''
    ipAddress = client.getIpAddress()
    hostOsh = modeling.createHostOSH(ipAddress)
    resultSet = client.executeQuery("select DaylightName, StandardName from Win32_Timezone")#@@CMD_PERMISION wmi protocol execution
    modeling.setDaylightNameAttribute(hostOsh, resultset.getString(1))
    modeling.setStandardNameAttribute(hostOsh, resultset.getString(2))
    
    OSHVResult.add(hostOsh)

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.