Add hour when days don't match GODT-655

This commit is contained in:
Jakub
2020-08-23 10:04:52 +02:00
committed by Michal Horejsek
parent 2d9417d501
commit 61867fbde7
2 changed files with 11 additions and 2 deletions

View File

@ -4,6 +4,8 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
## Unreleased ## Unreleased
## [IE 0.2.x] Congo
### Added ### Added
* GODT-633 Persistent anonymous API cookies for better load balancing and abuse detection. * GODT-633 Persistent anonymous API cookies for better load balancing and abuse detection.
@ -49,6 +51,7 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
* Structure for transfer rules in QML * Structure for transfer rules in QML
### Fixed ### Fixed
* GODT-655 Fix date picker with automatic Windows DST
* GODT-454 Fix send on closed channel when receiving unencrypted send confirmation from GUI. * GODT-454 Fix send on closed channel when receiving unencrypted send confirmation from GUI.
* GODT-597 Duplicate sending when draft creation takes too long * GODT-597 Duplicate sending when draft creation takes too long

View File

@ -247,8 +247,14 @@ Rectangle {
if (!isNaN(parseInt(dayInput.currentText))) { if (!isNaN(parseInt(dayInput.currentText))) {
day = Math.min(day, parseInt(dayInput.currentText)) day = Math.min(day, parseInt(dayInput.currentText))
} }
currentString = [ yearInput.currentText, monthInput.currentText, day].join("-") var month = gui.allMonths.indexOf(monthInput.currentText)
currentUnix = Date.fromLocaleDateString( locale, currentString, "yyyy-MMM-d").getTime() var year = parseInt(yearInput.currentText)
var pickedDate = new Date(year, month, day)
// Compensate automatic DST in windows
if (pickedDate.getDate() != day) {
pickedDate.setTime(pickedDate.getTime() + 60*60*1000) // add hour
}
currentUnix = pickedDate.getTime()
} }
return new Date(Math.max( return new Date(Math.max(
minDate.getTime(), minDate.getTime(),