4Eyes Posted November 16, 2012 Share Posted November 16, 2012 (edited) Folks, Looking at the helpfile in relation to _Date_Time_GetTimeZoneInformation() gives me a headache. The first element of the returned array is specified as: 0 - Daylight savings time is not used in the current time zone 1 - Daylight savings time operating with standard time 2 - Daylight savings time operating with daylight savings time I understand: '0 - Daylight savings time is not used in the current time zone' and '2 - Daylight savings time operating with daylight savings time' but what is 'Daylight savings time operating with standard time'? How can you have daylight savings time with no change to the local time or am I misinterpreting the explanation? I'm really tired so I assume that is the actual answer. Blah... meant to post this in the General help and support forum. Edited November 16, 2012 by 4Eyes Link to comment Share on other sites More sharing options...
danielkza Posted November 16, 2012 Share Posted November 16, 2012 0: Timezone doesn't have DST at all. 1: Timezone has DST, but it is not in effect. 2: Timezone has DST, and it is in effect. Link to comment Share on other sites More sharing options...
4Eyes Posted November 16, 2012 Author Share Posted November 16, 2012 danielkza, O, I C. Ta. Link to comment Share on other sites More sharing options...
nergmlam Posted December 2, 2013 Share Posted December 2, 2013 (edited) expandcollapse popupFunc _TimeConvert_GetDaylightSavingTime($__iShow) ; Please don't remove this line - © Copyright 2013: J. Malmgren, wwww.tryware.dk ; Get SystemTime, convert it with Daylight saving time (DST), and convert it according to $__iShow ; Return result: Syntax: ; YYYYMMDD HH:MM:SS $__iShow =1 ; YYYYMMDD $__iShow =2 ; HH:MM:SS $__iShow =3 ; HHMMSS $__iShow =4 ; ; Examples: ; ; MsgBox(0,"YYYYMMDD HH:MM:SS",_TimeConvert_GetDaylightSavingTime(1)) ; MsgBox(0,"YYYYMMDD",_TimeConvert_GetDaylightSavingTime(2)) ; MsgBox(0,"HH:MM:SS",_TimeConvert_GetDaylightSavingTime(3)) ; MsgBox(0,"HHMMSS",_TimeConvert_GetDaylightSavingTime(4)) ; MsgBox(0,"ERROR:",_TimeConvert_GetDaylightSavingTime(5)) Local $__sGetSystemTime = _Date_Time_GetSystemTime() Local $__sGetDstTime = _Date_Time_SystemTimeToTzSpecificLocalTime(DllStructGetPtr($__sGetSystemTime)) Local $__iGetTime = _Date_Time_SystemTimeToDateTimeStr($__sGetDstTime) Local $__sTime ; 1234567890123456789 ; 12/31/2013 23:23:22 Switch $__iShow Case 1 ; YYYYMMDD HH:MM:SS $__sTime = StringMid($__iGetTime, 7, 4) & ":" & StringMid($__iGetTime, 1, 2) & ":" & StringMid($__iGetTime, 4, 2) $__sTime = $__sTime & " " & StringMid($__iGetTime, 12, 3) & StringMid($__iGetTime, 15, 3) & StringMid($__iGetTime, 18, 2) Case 2 ; YYYYMMDD $__sTime = Int(StringMid($__iGetTime, 7, 4) & StringMid($__iGetTime, 1, 2) & StringMid($__iGetTime, 4, 2)) Case 3 ; HH:MM:SS $__sTime = StringMid($__iGetTime, 12, 3) & StringMid($__iGetTime, 15, 3) & StringMid($__iGetTime, 18, 2) Case 4 ; HHMMSS $__sTime = Int(StringMid($__iGetTime, 12, 2) & StringMid($__iGetTime, 15, 2) & StringMid($__iGetTime, 18, 2)) Case Else $__sTime = "SYNTAX ERROR: _TimeGetDaylightSavingTime = 1, 2, 3 or 4" EndSwitch Return $__sTime EndFunc Edited December 2, 2013 by Melba23 Added code tags Sincerely J. Malmgren IT-Programmer http://www.tryware.dk Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 2, 2013 Moderators Share Posted December 2, 2013 (edited) nergmlam,When you post code please use Code tags - see here how to do it. Then you get a scrolling box and syntax colouring as you can see above now I have added the tags. M23Edit: And I see you have posted this same function in several posts - I have deleted all the other instances. Next time just add it to the "Examples" section and please do not multi-post like that again! Edited December 2, 2013 by Melba23 Typo Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now