-
Notifications
You must be signed in to change notification settings - Fork 552
[IMPROVEMENT] Convert UTC to time #2077
base: develop
Are you sure you want to change the base?
[IMPROVEMENT] Convert UTC to time #2077
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this PR and closing the existent TODO here! But I think you could work with the Java 8 Date/Time API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add a function on DateTimeHelper class to convert UTC to Time.
@VANKINEENITAWRUN Could you please sign in our CLA? |
I did @filipedelimabrito it's still pending. |
|
||
fun utcToTime(utcOffset:Float?): String { | ||
val gmtTime = System.currentTimeMillis() // 2.32pm NZDT | ||
var timezoneAlteredTime: Long |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could Lift out the assignment timeZoneAlteredTime
. Directly could
timeZoneAlteredTime = if (condition ) value else other value
.
This would be according to Kotlin Coding style :)
@RocketChat/android
Closes #2046
Changes: [converted the given UTC offset to time.]
Screenshots or GIF for the change: