Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Re: Dates (GMT)


Message #1 by "Rachit" <rachitpatel@y...> on Tue, 24 Apr 2001 18:12:08
Hi rachit this asp script function gives u whole lot
of info about a computer's settings

regards
vishal
<%
Function ShowOSOptions(vComputerName)

 Dim objLocator, objService, objWEBMCol, objWEBM

 Set objLocator = CreateObject("WbemScripting.SWbemLocator")

 'Establish a connection to WMI
 If isEmpty(vServerName) = True then
  Set objService = objLocator.ConnectServer
 Else
  Set objService = objLocator.ConnectServer(vComputerName)
 End If
 'Get the Webm Service object
 Set objWEBMCol = objService.InstancesOf("Win32_ComputerSystem")

 Response.write "<H2>OS Options:</H2><HR><UL>"
 'Enumerate
 For Each objWEBM in objWEBMCol
  Response.write "<LI>Caption: " & objWEBM.Caption & _
  ", <BR>Current Time Zone: " & objWEBM.CurrentTimeZone & _
  ", <BR>Daylight In Effect: " & objWEBM.DaylightInEffect & _
 Next
 Response.write "</UL>"

 'Clean up
 Set objLocator = Nothing
 Set objService = Nothing
 Set objWEBMCol = Nothing
 Set objWEBM = Nothing

End Function

Call ShowOSOptions("vComputerName")
%>




"Rachit" <rachitpatel@y...> on 04/24/2001 11:46:42 PM

Please respond to "javascript" <javascript@p...>

To:   "javascript" <javascript@p...>
cc:    (bcc: Vishal Chopra/TMs/TCSSEEPZ/TCS)

Subject:  [javascript] Re: Dates (GMT)




TRansferred this one from Proasp_howto onto this list (which is javascript,
Rachit - I've subscribed you to this list so's you can see any replies you get).
MODERATOR
__________________Rachit asks:___________________________

is it possible to know daylight savings time (whether the client has
selected it on his machine or not) from javascript or any other scripting
language?


thank you,
Rachit





  Return to Index