Skip to content

Apple Watch crash on get var millisecondsSince1970  #23

@furiosFast

Description

@furiosFast

On Apple Watch i get this error that cause the crash of the app:
WatchKit App Extension[548:794557] Fatal error: Double value cannot be converted to Int because the result would be greater than Int.max: file Swift/armv7k-apple-watchos.swiftinterface, line 31242

The problem is for the var millisecondsSince1970 in the file Date+Extension.swift (line 29):

// Extended functionality to get milliseconds from 1970 to present time
public var millisecondsSince1970: Int {
    return Int((self.timeIntervalSince1970 * 1000.0).rounded())
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Status

📋 Backlog

Status

To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions