[PHP] Convert a date string to a Unix timestamp

Created on November 30, 2026

Use strtotime to parse a date string and get a Unix timestamp. The example specifies the Asia/Tokyo time zone in the input.

<?php

echo strtotime('2019-03-01 10:00:00 Asia/Tokyo');

Output

1551402000

Reference

PHP