vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
Zippen wie die Profis!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

Visual-Basic Einsteiger
Re: Wie komme ich an das UTC-Zeitformat? 
Autor: dbayer
Datum: 07.09.03 15:56

Intern arbeiten Win2K und XP mit dem UTC-Format.
Also muss man nur noch per konvertieren:
Declare Function SystemTimeToTzSpecificLocalTime Lib "kernel32.dll" _
(lpTimeZoneInformation As TIME_ZONE_INFORMATION, lpUniversalTime As SYSTEMTIME, _
lpLocalTime As SYSTEMTIME ) _
As Long

Parameters
lpTimeZone
[in] Pointer to a TIME_ZONE_INFORMATION structure that specifies the time zone of interest.
If lpTimeZone is NULL, the function uses the currently active time zone.

lpUniversalTime
[in] Pointer to a SYSTEMTIME structure that specifies a UTC. The function converts this universal time to the specified time zone's corresponding local time.
lpLocalTime
[out] Pointer to a SYSTEMTIME structure that receives the local time information.
Return Values
If the function succeeds, the return value is nonzero, and the function sets the members of the SYSTEMTIME structure pointed to by lpLocalTime to the appropriate local time values.

Aber es geht per Scripting auch einfacher:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colTimeZone = objWMIService.ExecQuery _
("Select * from Win32_TimeZone")
For Each objTimeZone in colTimeZone
Msgbox "Offset: "& objTimeZone.Bias 
Next

dbayerTo be is to do (Rene Descartes)To do is to be (Kant / Nietzsche / Sartre u.a.)Do be do be dooo (Frank Sinatra, Strangers in the Night)

alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Wie komme ich an das UTC-Zeitformat?2.720Plasma07.09.03 13:16
Re: Wie komme ich an das UTC-Zeitformat?2.117dbayer07.09.03 15:56
Re: Wie komme ich an das UTC-Zeitformat?2.194Plasma07.09.03 17:46
Re: Wie komme ich an das UTC-Zeitformat?2.119dbayer07.09.03 18:03
Re: Wie komme ich an das UTC-Zeitformat?2.039Plasma07.09.03 18:34
Re: Wie komme ich an das UTC-Zeitformat?2.129dbayer07.09.03 19:45
Re: Wie komme ich an das UTC-Zeitformat?2.127Plasma07.09.03 22:00
Re: Wie komme ich an das UTC-Zeitformat?2.037dbayer08.09.03 07:33
Danke 2.078Plasma08.09.03 12:48

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel