1
0
mirror of https://github.com/askn/faker.git synced 2023-08-10 21:13:01 +03:00

add Address.time_zone

This commit is contained in:
Aşkın Gedik 2016-01-06 14:35:08 +02:00
parent dd0be570be
commit 930398a41e
4 changed files with 35 additions and 31 deletions

View File

@ -31,7 +31,7 @@ Faker::Address.secondary_address
Faker::Address.building_number
Faker::Address.zip_code
Faker::Address.postcode
Faker::Address.time_zone
Faker::Address.street_suffix
Faker::Address.city_suffix
Faker::Address.city_prefix

View File

@ -9,7 +9,7 @@ puts Faker::Address.secondary_address
puts Faker::Address.building_number
puts Faker::Address.zip_code
puts Faker::Address.postcode
puts Faker::Address.time_zone
puts Faker::Address.street_suffix
puts Faker::Address.city_suffix
puts Faker::Address.city_prefix

View File

@ -59,5 +59,9 @@ module Faker
def self.longitude
((rand * 360) - 180).to_s
end
def self.time_zone
Faker.bothify(Faker.fetch(Data["address"]["time_zone"]))
end
end
end

File diff suppressed because one or more lines are too long