Code Monkey home page Code Monkey logo

Comments (2)

hansenmc avatar hansenmc commented on August 18, 2024

What is the issue/scenario that this helps address? Do we have users evaluating/parsing dateTime string values (without timezone) that are being evaluated as GMT and they want them evaluated as if they were in another timezone (e.g. America/New_York)?

  • We could obtain the CoRB client's TimeZone using TimeZone.getDefault() , and ensure that the TimeZone is set in the invokeModule().
  • Or were you thinking that the TimeZone ID would be explicitly specified as a CoRB option that is parsed with TimeZone.getTimeZone() and set in the TaskFactory.setupTask() for all of the Tasks for that job.
  • Would we want TimeZone to always be set for XCC requests, or only when enabled and/or explicitly set via options?

from corb2.

bbandlamudi avatar bbandlamudi commented on August 18, 2024

Hi Mads,
This is not a critical issue as we have an alternative, thought not elegant. Basically, when a query is executed through xcc on ML server, it gets the time zone from dynamic context of the request. Unless it is specified, XCC requests uses default timezone of JVM.

So, when you do fn:implicit-timezone() or fn:adjust-dateTime-to-timezone() in your queries, it always get the CoRB client's timezone and there is no easy way to force it always use the server timezone. This can be problematic as same code run from two timezones or daylight vs non-daylight savings time may behave differently. I found the problem when I was troubleshooting a job failure for another team here. The alternative it is to either hard code the timezone in xquery or pass as an external variable to prevent daylight savings shift.

Ideally, we should have an 'option' to always use the server's timezone (if ML allows it). But if Corb allows us to set the timezone, we don't need to hard code or make adjustments in the query/code.

from corb2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.