How to Get Current Timestamp?

2025-08-10Devutils Team
#tutorial#Unix Timestamp#Unix Timestamp Converter

Swift

NSDate().timeIntervalSince1970

Go

import (
  "time"
)
int64(time.Now().Unix())

Java

System.currentTimeMillis() / 1000

C

#include <sys/time.h>

// ...
struct timeval tv;
gettimeofday(&tv, NULL);
// Second: tv.tv_sec
// Millisecond: tv.tv_sec * 1000LL + tv.tv_usec / 1000

JavaScript

Math.round(new Date() / 1000)

Objective-C

[[NSDate date] timeIntervalSince1970]

MySQL

SELECT unix_timestamp(now())

SQLite

SELECT strftime('%s', 'now')

Erlang

calendar:datetime_to_gregorian_seconds(calendar:universal_time())-719528*24*3600.

PHP

<?php
// pure php
time();

Python

import time
time.time()

Ruby

Time.now.to_i

Shell

date +%s

Groovy

(new Date().time / 1000).longValue()

Lua

os.time()

.NET/C#

DateTimeOffset.UtcNow.ToUnixTimeSeconds();

Dart

(new DateTime.now().millisecondsSinceEpoch / 1000).truncate()

Unix Zaman Damgası

v1.1.3

Anında zaman damgasından tarihe veya tarihten zaman damgasına dönüşümler için ücretsiz Unix Zaman Damgası Dönüştürücü. Saat dilimlerini, birden fazla formatı, kolay kopyalamayı destekler. Şimdi deneyin!

facebooktwitterpinteresttumblrwhatsapp

Bize Ulaşın

[email protected]
Unix Timestamp Converter - Free unix timestamp converter & date tool | Product Hunt

© 2025 Unix Timestamp Converter Tüm hakları saklıdır.