mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Allow the user to set time zone
Fix timezone handling for periodic tasks
This commit is contained in:
@ -33,7 +33,7 @@ object EmptyTrashArgs {
|
||||
|
||||
val taskName = Ident.unsafe("empty-trash")
|
||||
|
||||
val defaultSchedule = CalEvent.unsafe("*-*-1/7 03:00:00")
|
||||
val defaultSchedule = CalEvent.unsafe("*-*-1/7 03:00:00 UTC")
|
||||
|
||||
def periodicTaskId(coll: Ident): Ident =
|
||||
Ident.unsafe(s"docspell") / taskName / coll
|
||||
|
@ -6,10 +6,8 @@
|
||||
|
||||
package docspell.common
|
||||
|
||||
import java.time.LocalDateTime
|
||||
import java.time.ZonedDateTime
|
||||
import java.time.temporal.ChronoUnit
|
||||
import java.time.{Instant, LocalDate, ZoneId}
|
||||
import java.time.{Duration => _, _}
|
||||
|
||||
import cats.effect.Sync
|
||||
|
||||
@ -57,7 +55,7 @@ case class Timestamp(value: Instant) {
|
||||
}
|
||||
|
||||
object Timestamp {
|
||||
val UTC = ZoneId.of("UTC")
|
||||
val UTC: ZoneId = ZoneOffset.UTC
|
||||
|
||||
val Epoch = Timestamp(Instant.EPOCH)
|
||||
|
||||
|
Reference in New Issue
Block a user