how to set time zone of Beijing China

yue-qi-qi
2012-11-02
2012-11-10
  • yue-qi-qi - 2012-11-02

    tzTimeZeon:RTCLK.TIME_ZONE_INFO
    If I am now in Beijing China,then How to fill the tzTimeZeon variables?

     
  • TimvH

    TimvH - 2012-11-10

    See the library for the Real Time Clock.
    The struct consists of an integer for the general offset in minutes and also an array of structs (Period_info) for the standard and daylight saving time dates and offset.
    The struct Period_info consist of a name, systemtime struct and integer for the time offset.
    The systemtime struct consists of date and time information when the daylight saving time starts and stops.

    In the DTU librarary is a global constant variable which contains the central european standard.
    The easiest way to see how the time zone information is declared, you can define a variable in you application as CET time zone:

    CET_TimeZone: DTU.TIME_ZONE_INFO := DTU.gc_tziTimeZoneCET;
    

    Please regard the fact that in this case the number "5" means the last day (last sunday) of the month.

    !!! with CAA DTUtil Extern library 3.5.1.0 the above mentioned definition should be:
    CET_TimeZone: DTU.RTCLK.TIME_ZONE_INFO := DTU.GlobalConstants.gc_tziTimeZoneCET

     

Log in to post a comment.