Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useUTC for oracle and postgres #7295

Merged
merged 1 commit into from
Feb 2, 2021
Merged

Conversation

Alankarsharma
Copy link
Contributor

@Alankarsharma Alankarsharma commented Jan 18, 2021

If useUTC is set to true, then for Oracle set environment variable 'ORA_SDTZ' and for postgres set 'PGTZ'.

Based on documentation I thought 'useUTC' was used for all databases, but it was actually set only for MSSQL.
If this option is set to true then I am setting environment variables for oracle and Postgres.

Description of change

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run lint passes with this change
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits follow conventions explained in CONTRIBUTING.md

If useUTC is set to true, then for Oracle set environment variable 'ORA_SDTZ' and for postgres set ''PGTZ'
@pleerock
Copy link
Member

pleerock commented Feb 2, 2021

Thank you for contribution!
It would be good if we'll have a documentation for this new option.

@pleerock pleerock merged commit e06a442 into typeorm:master Feb 2, 2021
@@ -16,6 +16,11 @@ export interface OracleConnectionOptions extends BaseConnectionOptions, OracleCo
*/
readonly schema?: string;

/**
* A boolean determining whether to pass time values in UTC or local time. (default: true).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it a breaking change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no code in this PR where this option is set to true explicitly. Maybe comment is just wrong @Alankarsharma ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is part of connection options. If user set this value to true in that case I am setting those environment variables.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default behaviour is false, so anyone who is using this for oracle or Postgres will not face any issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so it will be great to change comments and documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants