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

insert api Date type Wrongly added a day when you insert a value like "YYYY-MM-DD 23:59:59" in mssql #7151

Open
21 tasks
int8array opened this issue Dec 4, 2020 · 0 comments

Comments

@int8array
Copy link

Issue Description

import { Column, Entity, PrimaryGeneratedColumn} from 'typeorm';

@entity({
name: 'time_table'
})
export class TestTime {
@PrimaryGeneratedColumn({
name: 'id'
})
id: number

@column({
name: 'start_time',
type: 'datetime'
})
startTime: Date;

@column({
name: 'end_time'
})
endTime: Date;

}
export default TestTime;

const testRepo = getRepository(TestTime);
const testTimes = [{
startTime,
endTime
}];
return await testRepo.save(testTimes);

Expected Behavior

Actual Behavior

// include the output in code tags like these!

Steps to Reproduce

// insert code here

My Environment

Dependency Version
Operating System
Node.js version vX.Y.ZZZ
Typescript version vX.Y.ZZZ
TypeORM version vX.Y.ZZZ

Additional Context

Relevant Database Driver(s)

  • aurora-data-api
  • aurora-data-api-pg
  • better-sqlite3
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • sqlite
  • sqlite-abstract
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time, and I know how to start.
  • Yes, I have the time, but I don't know how to start. I would need guidance.
  • No, I don't have the time, although I believe I could do it if I had the time...
  • No, I don't have the time and I wouldn't even know how to start.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant