Item10389: Fn_SEARCH unit test is not TZ compliant

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.3
Target Release: patch
Applies To: Engine
Component:
Branches:
Reported By: OlivierRaginel
Waiting For: Main.OlivierRaginel
Last Change By: KennethLavrsen
If your timezone is UTC-something, 3 unit test might fail:
  • Fn_SEARCH::verify_date_param_ForkingSearch
  • Fn_SEARCH::verify_date_param_PurePerlSearch
  • Fn_SEARCH::verify_date_param_BruteForceQuery

This is due to the fact that it tries to create some very old topic by settings its date to 123 (epoch time), and then asking for all topics from the year 1970.

Problem is that the code which translates the "year 1970" into an interval search is timezone dependent, hence the 1st of January 1970 varies from -86400 to +86400 depending on your timezone.

Ugly fix: Set the date of the very old topic to something above 86400, so we're sure it will be found.

ALERT! Maybe we should fix Foswiki::Time::parseInterval to use some CPAN module which might be more clever?

-- OlivierRaginel - 21 Feb 2011

See Item9196 for the task Query search for date= fails in some timezones.

-- GeorgeClark - 21 Feb 2011
 

ItemTemplate edit

Summary Fn_SEARCH unit test is not TZ compliant
ReportedBy OlivierRaginel
Codebase 1.1.2, trunk
SVN Range
AppliesTo Engine
Component
Priority Normal
CurrentState Closed
WaitingFor OlivierRaginel
Checkins distro:2a8e8aaaf214 distro:df0e5706e940
TargetRelease patch
ReleasedIn 1.1.3
Topic revision: r6 - 16 Apr 2011, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy