class Timezone

Attributes

date[R]
dateTime[R]
dateTimeTxt[R]
dateTimeUnix[R]
dateTimeWti[R]
dateTimeYmd[R]
dstSavings[R]
isDST[R]
message[R]
month[R]
status[R]
time12[R]
time24[R]
timezone[R]
timezoneGeo[R]
timezoneOffset[R]
week[R]
year[R]
yearAbbr[R]

Public Class Methods

new(json) click to toggle source
# File lib/ipgeolocation_io/Timezone.rb, line 23
def initialize(json)
  @status = json["status"].to_i;
  if @status != 200 || json["message"] != nil
    @message = json["message"].to_s;
  else
    @timezone = json["timezone"];
    @timezoneOffset = json["timezone_offset"];
    @date = json["date"];
    @dateTime = json["date_time"];
    @dateTimeTxt = json["date_time_txt"];
    @dateTimeWti = json["date_time_wti"];
    @dateTimeYmd = json["date_time_ymd"];
    @dateTimeUnix = json["date_time_unix"];
    @time24 = json["time_24"];
    @time12 = json["time_12"];
    @week = json["week"];
    @month = json["month"];
    @year = json["year"];
    @yearAbbr = json["year_abbr"];
    @isDST = json["is_dst"];
    @dstSavings = json["dst_savings"];
    if json["geo"] != nil
      @timezoneGeo = TimezoneGeo.new(json["geo"]);
    end
  end
end