Page 1 sur 1

Timezone et date de changement de l'heure d'été

MessagePublié: 10 Déc 2012 à 12:34
par Michael DELIQUE
Hello

les champs timezone contiennent tout un tas d'informations dont celle permettant de connaitre le premiere et dernier jours de l'heur d'été

ex "Z=5$DO=1$DL=4 1 1 10 -1 1$ZX=25$ZN=Eastern"

c'est tout bien expliqué là => http://www-01.ibm.com/support/docview.w ... wg21163045

par contre les référence a ces date sont enregistré sous la forme mois/semaine/jour et j'aimerais l'avoir au format JJ/mm/aaaa

quelqu'un a des infos sur le sujet ?

Re: Timezone et date de changement de l'heure d'été

MessagePublié: 10 Déc 2012 à 13:04
par Michael DELIQUE
j'ai finalement trouvé ça ici => http://www-01.ibm.com/support/docview.w ... wg21578979

Code : Tout sélectionner
Function FindDSTDate(Y As String, M As String, W As String, D As String) As String
   'Although majority of timezones rely on Sunday as day to switch over some do not, and so
   ' the function is designed to take the D input as well.
   Dim i As Integer
   Dim ndtDST As New NotesDateTime("1/1/"&Y)
   
   Call ndtDST.AdjustMonth(M-1)
   If CInt(W)<>-1 Then
      For i=1 To CInt(W)
         While Weekday(ndtDST.dateonly)<>CInt(D)
            Call ndtDST.adjustday(1)
         Wend
         If i<>CInt(W) Then Call ndtDST.adjustday(1)
      Next
   Else  'Checks backwards for last "Sunday" of the month
      Call ndtDST.AdjustDay(30)
      While Weekday(ndtDST.DateOnly)<>CInt(D)
         Call ndtDST.AdjustDay(-1)
      Wend
   End If
   FindDSTDate=ndtDST.DateOnly
End Function