To convert GMT to Australian Central Time in Swift, you can follow these steps:
DateFormatter
instance:main.swift36 chars2 lines
main.swift49 chars2 lines
GMT
):main.swift55 chars2 lines
Date
instance:main.swift66 chars2 lines
DateFormatter
instance to format the output date:main.swift42 chars2 lines
main.swift55 chars2 lines
Australian Central Time
):main.swift61 chars2 lines
main.swift70 chars2 lines
The outputDateString
will contain the date
string in Australian Central Time.
Here's the complete example:
main.swift498 chars14 lines
gistlibby LogSnag