How to modify the time zone information to set with Adelaide, AU in DTutil library?

dsyakira
2017-11-02
2017-11-04
  • dsyakira - 2017-11-02

    I have tried using DTU.SetTimeZoneInformation, DTU.gc_tziTimeZoneCET but could get mine working.

    Both return my current time as UTC time.

    I am trying to get this working so that my Daylight Saving time automatically change.

    I am running this on a Raspberry Pi. My raspberry pi has the ntp server, I also have check out OSCAT network where they have the SNTP server function block, but I dont know how to use it. I am new to Codesys. Help would be appreciated.

     
  • eschwellinger

    eschwellinger - 2017-11-02

    Hi,
    from my point of view this is not needed
    if you are connected to a network isn't it thant you have the time Information set by the OS?
    So that's all you need.
    Here is an example application with osccat calender and example how to set events once a day..etc
    l viewtopic.php?f=23&t=6247&p=12387#p12396 l

    BR
    Edwin

     
  • dsyakira - 2017-11-02

    Edwin Schwellinger hat geschrieben:
    Hi,
    from my point of view this is not needed
    if you are connected to a network isn't it thant you have the time Information set by the OS?
    So that's all you need.
    Here is an example application with osccat calender and example how to set events once a day..etc
    l viewtopic.php?f=23&t=6247&p=12387#p12396 l
    BR
    Edwin

    I have tried the timerexample before I posted the question here, but using that example return my local time as UTC time. When I changed the offset time to 630/530 in minutes it shift the local time 1 day before.

     
  • eschwellinger

    eschwellinger - 2017-11-04

    Hi,
    hm.. i set 540 for 9h and this seems to work for me.
    SystemTimePrg.Calendar.LDT is then your local time.

    BR
    Edwin

    IMG: Timeoffset.jpg

     
  • eschwellinger

    eschwellinger - 2017-11-04

    puh...
    you are right this seems not to work for Adelaide

    BR
    Edwin

     
  • eschwellinger

    eschwellinger - 2017-11-04

    Hi,

    this seems to be a bug in the OSCAT Basic library in UTC_TO_LTIME.
    I will report this in the OSCAT Forum (oscat.de)

    You could solve this by change it in the library (the oscat libs are open) just open it from here:
    "c:\Users\<yourwindowsusername>\CODESYS OSCAT Basic\oscat_basic_333.library" </yourwindowsusername>

    just change the tmp variable from int to DINT and install it by under the 'File' menu

    BR
    Edwin

    IMG: UTC_TO_LTIME.jpg

    IMG: TimeZoneAdelaide.jpg

     

Log in to post a comment.