PHP code example of phpnomad / chronos-integration

1. Go to this page and download the library: Download phpnomad/chronos-integration library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

phpnomad / chronos-integration example snippets


public function __construct(
    HasTimezone $timezone,
    HasLocale   $locale,
)

use Cake\Chronos\Chronos;

Chronos::setTestNow('2026-05-27 12:00:00');
// ... exercise code that uses ChronosChronoStrategy
Chronos::setTestNow(); // clear