Perhaps they easiest way is to force the test to run in UTC, either
with the surefire JVM configuration
<https://github.com/geotools/geotools/blob/main/pom.xml#L1760>, or in the
test setup, like for example DateParserTest
<https://github.com/geotools/geotools/blob/main/modules/unsupported/geojson-core/src/test/java/org/geotools/data/geojson/DateParserTest.java#L17>

PRs with updates to make it build on your end too welcomed, the Github
actions will
run in UTC and confirm it can work for others as well (along with a manual
review checking the change).

Best regards
Andrea

On Wed, Jan 24, 2024 at 1:57 AM Jody Garnett <jody.garn...@gmail.com> wrote:

> In my experience some it can be interesting to write tests that compare
> times, often people write tests in Europe which then fail when we run them
> in North America due to timezone offset.
>
> Options:
>
>
>    1. When you look at the test is it possible to providing in GMT or Z
>    time for comparison? Look at the value prior to toString().
>    2. I am not sure if it is a bug in the code, in the test, or worst
>    case in the file format specification?
>
> --
> Jody Garnett
>
>
> On Dec 19, 2023 at 9:03:50 AM, pierre.cardi...@sympatico.ca wrote:
>
>> Hi,
>>
>>
>>
>> What is wrong with my settings ?
>>
>>
>>
>> When I run « mvn install », I have the following error:
>>
>>
>>
>> NetCDF gridcoverage module FAILURE
>>
>>
>>
>> To correct the problem I have to change the function
>>  testGranuleSourceFileView() in the file NetCDFMosaicReaderTest.java.
>>
>>
>>
>> The two lines :
>>
>>              assertEquals("2017-02-06 00:00:00.0",
>> nc1.getAttribute("time").toString());
>>
>>              assertEquals("2017-02-06 12:00:00.0",
>> nc2.getAttribute("time").toString());
>>
>>
>>
>> should be change for
>>
>>             assertEquals("2017-02-05 19:00:00.0",
>> nc1.getAttribute("time").toString());
>>
>>             assertEquals("2017-02-06 07:00:00.0",
>> nc2.getAttribute("time").toString());
>>
>>
>>
>>
>>
>> My computer is in the zone (UTC -05:00)  East (USA and Canada). It is
>> exactly the difference of time shown previously.
>>
>>
>>
>>
>>
>> Regards,
>>
>>
>>
>>
>>
>> Pierre
>> _______________________________________________
>> GeoTools-GT2-Users mailing list
>> GeoTools-GT2-Users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>


-- 

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax:     +39 0584 1660272

mob:   +39  339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it

-------------------------------------------------------

Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
precisa che ogni circostanza inerente alla presente email (il suo
contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
e-mail or the information herein by anyone other than the intended
recipient is prohibited. If you have received this email by mistake, please
notify us immediately by telephone or e-mail
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to