Current Unix Timestamp SECONDS SINCE JAN 01 1970

Current UTC Time
2025-08-20
How to convert UTC to local time in common programming languages

UTC to Local Time by Language

Language Code to Convert UTC to Local Time
Ada declare Time_Now : Ada.Calendar.Time := Ada.Calendar.Clock; Local : Time_Conversions.To_Local_Time(Time_Now);
AutoHotKey FormatTime, LocalTime, %A_NowUTC%, yyyy-MM-dd HH:mm:ss
Ballerina time:Civil civil = time:utcToCivil(time:utcNow());
Bash date -d @$(date -u +%s)
C++ time_t utc = time(nullptr); struct tm* local = localtime(&utc);
C# DateTime.UtcNow.ToLocalTime();
Cobol COMPUTE WS-LOCAL-TIME = FUNCTION CURRENT-DATE
ColdFusion dateConvert("utc2Local", now())
Common Lisp (local-time:universal-to-timestamp (get-universal-time))
CQL (Cassandra) SELECT CAST(dateOf(now()) AS timestamp) AT TIMEZONE 'LOCAL';
Crystal Time.utc.to_local
Dart DateTime.now().toLocal()
DAX LOCALDATETIME()
Elixir DateTime.utc_now() |> DateTime.shift_zone!(Time.zone_info())
Erlang calendar:universal_time_to_local_time(calendar:universal_time())
Excel =CONVERT(NOW(), "UTC", "Local")
Fortran call gmtime(time, values); call localtime(time, local_values)
Forth time&date local-time
F# DateTimeOffset.UtcNow.LocalDateTime
Go time.Now().UTC().Local()
Groovy TimeZone.getDefault().convertUTCToLocal(new Date())
Haskell utcToLocalTime <$> getTimeZone <*> getCurrentTime
Haxe Date.fromTime(Date.now().getTime()).toString()
Io Date clone setGMTOffset(Date gmtOffset)
Java ZonedDateTime.now(ZoneId.of("UTC")).withZoneSameInstant(ZoneId.systemDefault())
JavaScript new Date().toLocaleString()
Julia using Dates; now(localzone())
Kotlin ZonedDateTime.now(ZoneId.of("UTC")).withZoneSameInstant(ZoneId.systemDefault())
Laravel now()->setTimezone(config('app.timezone'))
Lua os.date("*t")
MATLAB datetime('now', 'TimeZone', 'UTC', 'Format', 'local')
MySQL CONVERT_TZ(UTC_TIMESTAMP(), 'UTC', @@session.time_zone)
Nim import times; getTime().utc.local
Objective-C [[NSDate date] timeIntervalSinceReferenceDate]
OCaml let local_time = Unix.localtime (Unix.time ())
Pascal GetLocalTime(SystemTime);
Perl use DateTime; DateTime->now(time_zone => 'local');
PHP date('Y-m-d H:i:s', strtotime('now'))
PL/SQL SELECT CAST(SYS_EXTRACT_UTC(SYSTIMESTAMP) AT TIME ZONE DBTIMEZONE AS TIMESTAMP) FROM DUAL;
PostgreSQL TIMEZONE('localtime', NOW() AT TIME ZONE 'UTC')
PowerShell [System.TimeZoneInfo]::ConvertTimeFromUtc((Get-Date).ToUniversalTime(), [System.TimeZoneInfo]::Local)
Prolog get_time(UTC), stamp_date_time(UTC, Local, local).
Python from datetime import datetime; datetime.utcnow().astimezone()
R as.POSIXlt(Sys.time(), tz = Sys.timezone())
Racket (current-local-seconds)
React new Date().toLocaleString()
Ruby Time.now.utc.getlocal
Rust use chrono::{DateTime, Utc, Local}; let local = DateTime::from(Utc::now());
SAS %let local_time = %sysfunc(datetime());
Scala java.time.ZonedDateTime.now(ZoneId.of("UTC")).withZoneSameInstant(ZoneId.systemDefault())
Scheme (time-utc->local (current-time))
SQLite datetime(CURRENT_TIMESTAMP, 'localtime')
SML Date.fromTimeLocal(Time.now())
Swift Date().timeIntervalSince1970.localizedDescription
TCL clock format [clock seconds] -timezone :localtime
T-SQL SELECT DATEADD(minute, DATEDIFF(minute, GETUTCDATE(), GETDATE()), GETUTCDATE())
TypeScript new Date().toLocaleString()
V time.now().local()
VBScript DateAdd("n", -TimeZoneOffset, Now)
Vala var now = new DateTime.now_local();
Xojo DateTime.Now.LocalDateTime
Zig const local = std.time.timestamp().toLocalTime();
Current Unix Timestamp SECONDS SINCE JAN 01 1970

Current UTC Time
2025-08-20
Ad Banner Placeholder
Ad Banner Placeholder
Ad Banner Placeholder
Ad Banner Placeholder