Code Monkey home page Code Monkey logo

Comments (4)

johng42 avatar johng42 commented on September 25, 2024

I'll start with the obvious question - what time zone is set on each machine?

I suspect this line in ...\TabPy-master\TabPy-master\tabpy\tabpy_tools\rest_client.py (line 9)

    return datetime.utcfromtimestamp(value)

In this case, the value of the date is changed to UTC and that may not be the same as the expected time zone. That might throw off the value by enough to make this date appear as the wrong day.

    return datetime.fromtimestamp(value)

might work. I don't any way to test that but it could be worth a shot to see if that would fix, or at least change, the behavior.

from tabpy.

tolivier-voo avatar tolivier-voo commented on September 25, 2024

Thanks for your answer,

How can I try that
(To recompile and modify this file on an pip tapby installation)

The 2 computers (Server and Local) are on the same Timezone (Brussels Time)

from tabpy.

johng42 avatar johng42 commented on September 25, 2024

I think you could simply find and modify the rest_client.py file on the server. When I last worked on tabpy, we didn't compile the python code so that should be enough. Restarting the server after the modification may also be needed.

That will at least identify if this line might need to be updated. There is more testing that will need to be done before accepting this change. For example, this particular line appears to be a fallback case so the root cause to avoid the fallback might suggest a better fix elsewhere...

from tabpy.

tolivier-voo avatar tolivier-voo commented on September 25, 2024

Hello,

Sorry for the late reply, busy time,

I've tried this change bu this issue is still occuring.
image
image

Test Script Content :

import pandas as pd

def main_function(input_df):
	return input_df

def get_output_schema():
    return pd.DataFrame({
		'ID': prep_string(),
		'Name': prep_string(),
		'Date': prep_date()
		})

from tabpy.

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.