[IMPROVEMENT] Convert UTC to time#2077
[IMPROVEMENT] Convert UTC to time#2077VANKINEENITAWRUN wants to merge 3 commits intoRocketChat:developfrom
Conversation
|
|
philipbrito
left a comment
There was a problem hiding this comment.
Thanks for submitting this PR and closing the existent TODO here! But I think you could work with the Java 8 Date/Time API.
philipbrito
left a comment
There was a problem hiding this comment.
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.
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: