TimeZone +6 hrs ahead when retrieving datetime from userfn.php

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
sticcino
User
Posts: 1090

TimeZone +6 hrs ahead when retrieving datetime from userfn.php

Post by sticcino »

v2024

locale: en-US ( "time_zone": "America/New_York")

when retrieving datetime from withing the userfn.php using currentdatetime(), it is always returning 6hrs ahead.
tested with date("F j, Y, g:i a"), and this is also returning 6hrs ahead.

is there another location or file that is setup incorrectly that we missed?


sticcino
User
Posts: 1090

Post by sticcino »

notes:

in page load function as a test:

function Page_Loading()
{
    global $BODY_CLASS;

    date_default_timezone_set('America/New_York');
    $StartDate = CurrentDateTime();
    
**$StartDate = correct time**
}

but it does not hold, once it goes back into one of the functions, the time jumps +6hrs


arbei
User
Posts: 9787

Post by arbei »

Note that in Global Code, the Language class is not loaded yet. You may load it yourself by calling Security(), or you should call your function later.


Post Reply