Giter VIP home page Giter VIP logo

Comments (5)

Tishj avatar Tishj commented on June 24, 2024

Yes that's intended:

		if (type.id() == LogicalTypeId::TIMESTAMP_TZ) {
			// We have to add the timezone info
			auto tz_utc = import_cache.pytz.timezone()("UTC");
			auto timestamp_utc = tz_utc.attr("localize")(py_timestamp);
			auto tz_info = import_cache.pytz.timezone()(client_properties.time_zone);
			return timestamp_utc.attr("astimezone")(tz_info);
		}

We need pytz to be able to convert the value to the right python type

from duckdb.

thiagola92 avatar thiagola92 commented on June 24, 2024

Sorry, I meant "It's intended not being included in the package?"
Taking in count that duckdb is suppose to be light, this would make sense but I wasn't sure.

from duckdb.

Tishj avatar Tishj commented on June 24, 2024

Yes that's intended, we don't include dependencies in the package
You could circumvent this issue by casting the TIMESTAMPTZ column to VARCHAR, or TIMESTAMP if you prefer not to install pytz

from duckdb.

thiagola92 avatar thiagola92 commented on June 24, 2024

Yes that's intended, we don't include dependencies in the package You could circumvent this issue by casting the TIMESTAMPTZ column to VARCHAR, or TIMESTAMP if you prefer not to install pytz

No problem at all, I can totally install pytz.
For some reason I though that datetime conversion would be standard and was not expecting an error.

As this is expected, I'm closing this.

from duckdb.

soerenwolfers avatar soerenwolfers commented on June 24, 2024

@Tishj what's the reason for not specifying dependencies, if I may ask? Users that don't want dependencies to be installed can already use --no-deps in pip or equivalent options elsewhere. Alternatively, you could provide a duckdb[full] installation option for users to opt into dependencies.

from duckdb.

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.