1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-03-22 00:09:59 +01:00

Merge pull request #52 from blaugueux/master

Added timezone generator to DateTime provider
This commit is contained in:
Francois Zaninotto 2012-09-03 10:45:14 -07:00
commit e288d3ca6c
2 changed files with 8 additions and 0 deletions

View File

@ -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`

View File

@ -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());
}
}