Fix incorrect week day calculation in LegacyTimePeriod::ParseTimeSpec

fixes #6943