I’m using the follwing code to get the offset:
TimeZone.getDefault().getRawOffset()
After looking at the docs for getRawOffset I noticed the following:
Because this value is not affected by daylight saving time, it is
called raw offset.
So is the time offset in gerneal should not be effected by daylight saving or there’s differance between time offset and raw time offset.
It depends on what you mean by “the time offset in general”. The raw offset is what’s otherwise known as the standard offset for a time zone – the difference between UTC and local time when daylight saving time is not taken into account.
The wall offset at any particular time won’t be the same as the raw offset when DST is being observed. To obtain that, you need to specify the exact instant of time you’re interested in, e.g. via
TimeZone.getOffset(long).If you need a more specific answer, you’ll need to know a more specific question – including information about exactly what offset you’re talking about.