diff --git a/readme.md b/readme.md index 39748a9c..6d827656 100644 --- a/readme.md +++ b/readme.md @@ -142,6 +142,7 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle monthName // 'January' year // '1993' century // 'VI' + timezone // 'Europe/Paris' ### `Faker\Provider\Miscellaneous` diff --git a/src/Faker/Provider/DateTime.php b/src/Faker/Provider/DateTime.php index c6c66fbc..7c060ade 100644 --- a/src/Faker/Provider/DateTime.php +++ b/src/Faker/Provider/DateTime.php @@ -178,4 +178,11 @@ class DateTime extends \Faker\Provider\Base return static::randomElement(static::$century); } + /** + * @example 'Europe/Paris' + */ + public static function timezone() + { + return static::randomElement(\DateTimeZone::listIdentifiers()); + } } \ No newline at end of file