'Php IntlDateFormatter class does not show unix timestamp

I'm trying to get the unix timestamp with IntlDateFormatter.

I've tried this

$formatter = new IntlDateFormatter(
        'fr_FR',
        IntlDateFormatter::FULL,
        IntlDateFormatter::FULL,
        'Europe/Paris',
        IntlDateFormatter::TRADITIONAL,
        'unix'
    );
echo $formatter->format(strtotime('now'));

Gave me 2022, while I'm trying to get it in this format 1644601950.

I've also tried to change unix with U AND u etc. but I can't find the right keyword for the unix timestamp in IntlDateFormatter class.

If I change the 'unix' to 'YY-MM-d' it would give me 22-02-11, but it's not in unix timestamp format.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source