Sys.timezone Function in R (Example) | Get Name of Current Time Zone
In this article you’ll learn how to return the name of the current time zone using the Sys.timezone() function in R programming.
Table of contents:
Let’s just jump right in!
Example: Get Name of Current Time Zone Using Sys.timezone() Function
The following R programming syntax demonstrates how to print the currently used time zone within the R programming language.
For this task, we can apply the Sys.timezone function as shown below:
Sys.timezone() # Apply Sys.timezone function #  "Etc/UTC"
The RStudio console returns information about the currently used time zone, i.e. Etc/UTC.
Video & Further Resources
Would you like to learn more about the application of the Sys.timezone() function? Then you might want to watch the following video on my YouTube channel. I demonstrate the R code of the present post in the video.
The YouTube video will be added soon.
Furthermore, you may read the other articles on this website:
- Change Default Time Zone in R
- strptime & strftime in R
- Introduction to System Calls & Commands
- Important Commands in R (+ Examples)
- R Programming Tutorials
To summarize: At this point you should have learned how to apply the Sys.timezone() function in the R programming language. In case you have additional questions, don’t hesitate to tell me about it in the comments section.
Statistics Globe Newsletter