Every timestamp AccessAlly writes to a log comes from one clock, is stored in UTC, and is only converted to local time when it is displayed. Here is the full map.
ARTICLE CONTENT:
01The one clock
Every timestamp in AccessAlly — regardless of which log writes it — originates in a single function. It reads PHP’s time() and caches it once per request, so all entries written during one request share an identical moment.
// resource/accessally-utilities.php:1508
public static function get_current_time() {
if (false === self::$cached_current_time) {
self::$cached_current_time = time(); // UTC Unix epoch
}
return self::$cached_current_time;
}
02Two storage wrappers
From that clock, an entry is stored one of two ways. Six tables format it into a UTC datetime string via get_sql_time(), which wraps the clock in gmdate('Y-m-d H:i:s'). The other two write the raw Unix integer straight to the column. Same moment, two representations on disk — and the database schema proves it: the string tables use a datetime column, the integer tables use bigint(20).
03Every log table & its setter
The complete map. Note that field-operation-log.php has no setter of its own — it is read-only reporting over the same aal_custom_ops_log table, so it shares that timestamp source rather than adding a new one.
| # | Log (UI name) | Table | Setter | Source line | Column type | Stored as |
|---|---|---|---|---|---|---|
| 1 | HTTP POST / retry log | pal_http_post_log | get_sql_time() | database-utilities.php:113 | datetime | UTC string |
| 2 | Hosted-plugin log | pal_hosted_plugin_log | get_sql_time() | database-utilities.php:139 | datetime | UTC string |
| 3 | Local CRM log | aal_crm_log | get_current_time() | local-crm-utilities.php:636 | bigint(20) | Unix int |
| 4 | Zapier log | aal_zapier_log | get_current_time() | zapier-utilities.php:54, 81 | bigint(20) | Unix value |
| 5 | Team Log | aal_team_log | get_sql_time() | team-log.php:340 | datetime | UTC string |
| 6 | Field-operation log | aal_custom_ops_log | get_sql_time() | accessally-logs.php:274 | datetime | UTC string |
| 7 | Admin / Manage-User ops log | aal_admin_ops_log | get_sql_time() | manage-user.php:68 | datetime | UTC string |
| 8 | Email send log | aal_email_log | get_sql_time() | email-send.php:60, 133, 203 | datetime | UTC string |
04From stored UTC to the time you see
Storage is always UTC. Conversion to a human-readable local time happens only at render, in three steps.
// 1 — database-utilities.php:94
convert_sql_time_to_display()
// 2 — database-utilities.php:87
→ convert_sql_time_to_unix() // strtotime($sql_time . ' UTC')
// 3 — membership-utilities.php:1175
→ convert_unix_time_to_readable_date()
$date->setTimezone(new DateTimeZone($extra_settings['timezone']));
$date->format($display_format);
The display timezone comes from AccessAlly’s own timezone setting ($extra_settings['timezone']), not WordPress core’s Settings → General timezone. When those two disagree, logged times look “off” even though the stored data is correct.
What “local time” actually means
It is not the visitor’s browser time, the web server’s clock, or even WordPress’s own timezone. “Local time” is whatever zone is chosen in AccessAlly’s own Time zone setting.
- Where you set it: AccessAlly → Settings, in the section titled Time zone (“customize the time zone for AccessAlly date / time configuration”) — a single dropdown.
- What it holds: a full zone name such as
America/New_York, not a UTC offset. - Default:
America/New_York(US Eastern), so an install nobody has changed shows all log times in Eastern. - Independent of WordPress: AccessAlly ignores WordPress’s Settings → General timezone for log display. If the two zones differ, times can look wrong even though the stored UTC data is correct.
05The exceptions
Two places skip the conversion step and print the stored UTC value directly — worth knowing before someone reports a “wrong” time.
Displayed as raw UTC (no timezone conversion)
- Team Log — prints the stored value as-is:
str_replace('{{date}}', esc_html($row['timestamp']), …)team-log.php:182 - Email order / payment display —
{{timestamp}}renders raw:esc_html($order_row->timestamp)email-send.php:309
AccessAlly records every log timestamp from a single UTC clock (time()), stores it in UTC, and converts to local time only at display using AccessAlly’s own timezone setting — with the Team Log being the notable exception that shows raw UTC.