Designing a REST API: Unix time vs ISO-8601


In what format should a REST API return and accept timestamps? The two most popular ways are Unix time (or a slight variation thereof) or ISO-8601. Both have their strengths and weaknesses and both are equally popular as we shall see. A sample of 20 APIs yielded nearly a 50/50 split. Therefore, no matter if this holds any persuasion or not, one can walk away knowing that their method of choice given Unix time or ISO-8601, is common knowledge and shouldn’t present a steep learning curve to other developers.



首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.130.0. UTC+08:00, 2024-07-18 10:11
浙ICP备14020137号-1 $访客地图$