Merge branch 'master' into develop
This commit is contained in:
		
						commit
						0fb92720f8
					
				|  | @ -30,6 +30,8 @@ | |||
| 
 | ||||
| - Fixed the selfupdate command not working on Windows due to missing `.exe` in the extracted binary path ([#2589](https://github.com/pocketbase/pocketbase/discussions/2589)). | ||||
| 
 | ||||
| - Added `int64`, `int32`, `uint`, `uint64` and `uint32` support when scanning `types.DateTime` ([#2602](https://github.com/pocketbase/pocketbase/discussions/2602)) | ||||
| 
 | ||||
| 
 | ||||
| ## v0.16.3 | ||||
| 
 | ||||
|  |  | |||
|  | @ -78,7 +78,7 @@ func (d *DateTime) Scan(value any) error { | |||
| 		d.t = v.Time() | ||||
| 	case time.Time: | ||||
| 		d.t = v | ||||
| 	case int: | ||||
| 	case int, int64, int32, uint, uint64, uint32: | ||||
| 		d.t = cast.ToTime(v) | ||||
| 	case string: | ||||
| 		if v == "" { | ||||
|  |  | |||
|  | @ -32,6 +32,11 @@ func TestParseDateTime(t *testing.T) { | |||
| 		{nowDateTime, nowStr}, | ||||
| 		{nowTime, nowStr}, | ||||
| 		{1641024040, "2022-01-01 08:00:40.000Z"}, | ||||
| 		{int32(1641024040), "2022-01-01 08:00:40.000Z"}, | ||||
| 		{int64(1641024040), "2022-01-01 08:00:40.000Z"}, | ||||
| 		{uint(1641024040), "2022-01-01 08:00:40.000Z"}, | ||||
| 		{uint64(1641024040), "2022-01-01 08:00:40.000Z"}, | ||||
| 		{uint32(1641024040), "2022-01-01 08:00:40.000Z"}, | ||||
| 		{"2022-01-01 11:23:45.678", "2022-01-01 11:23:45.678Z"}, | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue