getLocalMeanTimeOffset method

double getLocalMeanTimeOffset()

A method that will return the location's local mean time offset in milliseconds from local standard time. The globe is split into 360°, with 15° per hour of the day. For a local that is at a longitude that is evenly divisible by 15 (longitude % 15 == 0), at solar {@link net.sourceforge.zmanim.AstronomicalCalendar#getSunTransit() noon} (with adjustment for the equation of time) the sun should be directly overhead, so a user who is 1° west of this will have noon at 4 minutes after standard time noon, and conversely, a user who is 1° east of the 15° longitude will have noon at 11:56 AM. Lakewood, N.J., whose longitude is -74.2094, is 0.7906 away from the closest multiple of 15 at -75°. This is multiplied by 4 to yield 3 minutes and 10 seconds earlier than standard time. The offset returned does not account for the Daylight saving time offset since this class is unaware of dates.

@return the offset in milliseconds not accounting for Daylight saving time. A positive value will be returned East of the 15° timezone line, and a negative value West of it. @since 1.1

Implementation

double getLocalMeanTimeOffset() {
  return (getLongitude() * 4 * _MINUTE_MILLIS -
          getDateTime().timeZoneOffset.inMilliseconds)
      .toDouble();
}