Login entry to Audit Trail - wrong time

all other entries are correct when it comes to the time.

when a entry from the login/logout occurs, the time is off by hours…

image

as a test, added date_default_timezone_set(), to the WriteAuditLog() function

function WriteAuditLog($usr, $action, $table, $field = "", $keyvalue = "", $oldvalue = "", $newvalue = "")
{
ADDED ===>>>    date_default_timezone_set('America/New_York');    <<===
    WriteAuditTrail("log", DbCurrentDateTime(), ScriptName(), $usr, $action, $table, $field, $keyvalue, $oldvalue, $newvalue);
}

when the above line is added the time posts correctly…
image

as noted, all other entries into the log system are correct times.

there is a locale file in the locale folderm with the correct TZ
“time_zone”: “America/New_York”

The date_default_timezone_set() is already set by the Language object when the login/loguut page is loaded as long as the locale file exists (which file name matches the language ID of your current language, e.g. “en-US.json”) and contains the “time_zone” setting. If you use multi-language, make sure time zone of all locales are set, and the locale files are generated and uploaded to your site.

I don’t have the locale files foe rhe other languages, but will generate.
This was with the default English.

I will also generate en-ca incase it is picking up Canadian english instead of US and aee what happens

Thanks

how does one go about generating the additional locales, the only one in the local folder is en-US… not sure how it got there.

i selected the other locales
image

they are bolded, but no files are generated… also checed under user\appData…

If your project use Multi-Language, make sure the setting Multi-Language is checked.

Also make sure all language files with matching language IDs for the bolded locales are placed correctly in the source folder, read Making Language Files.