{"id":347640,"date":"2023-05-19T09:02:42","date_gmt":"2023-05-19T09:02:42","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=347640"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=347640","title":{"rendered":"<span>\u0415\u0434\u0438\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043c\u043d\u043e\u0439 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u0411\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u043a\u0430\u043a best practice. \u041a\u0430\u043a \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u0435\u0431\u0435 \u0447\u0430\u0441\u043e\u0432\u044b\u0435 \u043f\u043e\u044f\u0441\u0430 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0441 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c Angular, \u0432\u0432\u0438\u0434\u0443 \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u043d \u0438 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442. \u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0434\u0438\u0432\u044b \u0438 \u0434\u043b\u044f React\/Vue\/&#8230; \u0432 \u0441\u0445\u043e\u0436\u0438\u0445 \u043a\u0435\u0439\u0441\u0430\u0445.<\/p>\n<p>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0433\u043e\u043b\u043e\u0441\u0441\u0430\u0440\u0438\u0439:<\/p>\n<ul>\n<li>\n<p>\u043f\u0430\u0439\u043f (pipe) \u0432 Angular &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435; \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u0430\u043a \u0447\u0438\u0441\u0442\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e<\/p>\n<\/li>\n<li>\n<p>TZ &#8212; time zone &#8212; \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441<\/p>\n<\/li>\n<li>\n<p>DRY &#8212; don&#8217;t repeat yourself<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0432\u0438\u0434\u0443 \u0441\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0440\u0430\u044f \u0438 \u043d\u0435\u044f\u0441\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b frontend \u0438 backend \u0441 \u0434\u0430\u0442\u0430\u043c\u0438 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u0431\u044b\u043b\u0438 \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u044b \u043d\u0430 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043a \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044e:&nbsp;<\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/146109\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/post\/146109\/<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%92%D1%81%D0%B5%D0%BC%D0%B8%D1%80%D0%BD%D0%BE%D0%B5_%D0%BA%D0%BE%D0%BE%D1%80%D0%B4%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5_%D0%B2%D1%80%D0%B5%D0%BC%D1%8F\" rel=\"noopener noreferrer nofollow\">https:\/\/ru.wikipedia.org\/wiki\/%D0%92%D1%81%D0%B5%D0%BC%D0%B8%D1%80%D0%BD%D0%BE%D0%B5_%D0%BA%D0%BE%D0%BE%D1%80%D0%B4%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5_%D0%B2%D1%80%D0%B5%D0%BC%D1%8F<\/a>&nbsp;&#8212; \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 UTC, GMT<\/p>\n<\/li>\n<\/ol>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"351\" width=\"351\">\n<p>\u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<th>\n<p>\u041e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"left\">1. \u041e\u0431\u0449\u0435\u043d\u0438\u0435 \u0444\u0440\u043e\u043d\u0442\u0430 \u0441 \u0431\u044d\u043a\u043e\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 iso-string \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0447\u0430\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 UTC (Z &#8212; \u043c\u0435\u0442\u043a\u0430 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0447\u0430\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430)<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212; \u0432\u0440\u0435\u043c\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0434\u043e\u043b\u0436\u043d\u043e) \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 UTC \u043f\u043e 0 \u043f\u043e\u044f\u0441\u0443 (\u043d\u0435 \u0432\u0430\u0436\u043d\u043e \u044d\u0442\u043e iso-string \u0438\u043b\u0438 timestamp)<\/p>\n<p align=\"left\">&#8212; \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0434\u0430\u0442\u044b \u0441 \u0447\u0430\u0441\u043e\u0432\u044b\u043c \u043f\u043e\u044f\u0441\u043e\u043c, \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c \u043e\u0442 0, \u0432\u0440\u0435\u043c\u044f, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0435 \u0432 \u0431\u0430\u0437\u0443, \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043e \u043a 0 \u0447\u0430\u0441\u043e\u0432\u043e\u043c\u0443 \u043f\u043e\u044f\u0441\u0443 <\/p>\n<p align=\"left\">&#8212; \u0435\u0434\u0438\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0438 \u0448\u043a\u0430\u043b\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438<\/p>\n<p align=\"left\">&#8212; UTC = \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u044b\u0439, \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<p align=\"left\">&#8212; \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u0430\u044f \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0430\u043d\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 UTC \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u0442\u0430\u043b\u043e\u043d\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"left\">2. \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043a\u0438 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0435\u0437\u0434\u0435 \u0433\u0434\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0431\u0440\u0430\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0430 \u043d\u0435 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212; \u0432\u0440\u0435\u043c\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u0432\u0438\u0434\u0443 \u043d\u0435 \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441 UTC)<\/p>\n<p align=\"left\">&#8212; \u0432\u0440\u0435\u043c\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0430\u0432\u0434\u0438\u0432\u043e (\u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"left\">3. \u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u044f\u0441\u0443 \u0434\u043b\u044f \u043c\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 \u0432\u0438\u0434\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f<\/p>\n<p align=\"left\">\u041f\u0440\u0438\u043c\u0435\u0440: &#171;+180&#187; = &#171;+03:00&#187; =  TZ \u041c\u043e\u0441\u043a\u0432\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212; \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 date pipe angular&#8217;\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<p align=\"left\">&#8212; \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043b\u044e\u0441\u0442\u0438 \u0444\u043e\u0440\u043c\u0430\u0442 UTC \u043f\u0440\u0438 \u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c<\/p>\n<p align=\"left\">\n<p>\u041d\u0443\u0436\u043d\u043e \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:&nbsp;<\/p>\n<p align=\"left\">&#8212; number ( \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u0447\u0430\u0441\u0430\u0445 &#171;(+\/-)&nbsp; * 60&#187;)<\/p>\n<p align=\"left\">&#8212; string (\u043f\u0440\u0438\u043c\u0435\u0440, \u041c\u043e\u0441\u043a\u0432\u0430 &#8212; &#171;+03:00&#187;)<\/p>\n<p align=\"left\">\n<p>\u0424\u043e\u0440\u043c\u0430\u0442 \u0442\u0438\u043f\u0430&nbsp;string \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 date pipe \u0432 \u0432\u0438\u0434\u0435 \u043a\u0430\u043a \u0435\u0441\u0442\u044c (\u043f\u0440\u0438\u043c\u0435\u0440: &#171;timeVar | date: &#171;DD:MM:YYYY HH:mm : &#171;+03:00&#187; =&gt; 01.01.2020 11:32; UTC &#8212; 01.01.2020 08:32).<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"left\">4. \u041d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u044b\u0432\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443<\/p>\n<p align=\"left\">\u041f\u0440\u0438\u043c\u0435\u0440: &#171;DD:MM:YYYY HH:mm&#187;<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212; \u0443\u043d\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 DRY<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"left\">5. \u0414\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0432\u044b\u0432\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u044b\u0439 \u043f\u0430\u0439\u043f<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212; \u0443\u043d\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 DRY<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"left\">6. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 iso-string (\u0432 UTC) \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043f\u0440\u0438 \u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212; \u0435\u0434\u0438\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0438 \u0448\u043a\u0430\u043b\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438<\/p>\n<p align=\"left\">&#8212; \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0438\u0437 iso-string \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443<\/p>\n<p align=\"left\">&#8212; iso-string &#171;\u043a\u0443\u0448\u0430\u044e\u0442&#187; \u0432\u0441\u0435 (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043f\u0440\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0447\u0430\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>\u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Angular (\u0432 \u0446\u0435\u043b\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u0435\u043d \u0431\u0435\u0437 \u0437\u043d\u0430\u043d\u0438\u044f)<\/h4>\n<ul>\n<li>\n<p>Component &#8212; \u043d\u0435\u043a\u0430\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0441 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 (\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 &#8212; .ts \u0444\u0430\u0439\u043b)<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d &#8212; html-\u0444\u0430\u0439\u043b, \u0441\u043e\u0435\u0434\u0438\u043d\u0451\u043d\u043d\u044b\u0439 \u0441 Component<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f \u0432 Angular &#8212; \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438 \u043b\u043e\u0433\u0438\u043a\u0438 (\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435: Component \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430; <a href=\"https:\/\/metanit.com\/web\/angular2\/2.5.php\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435<\/a>)<\/p>\n<\/li>\n<li>\n<p>FormControl &#8212; \u044d\u043b\u0435\u043c\u0435\u043d\u0442 Angular Forms; \u043a\u043b\u0430\u0441\u0441 \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 set, get, \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044b \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438 \u0434\u0440.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u043d\u043e:&nbsp;<\/p>\n<ol>\n<li>\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 (Component) \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c (html)<\/p>\n<\/li>\n<li>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 (backend)<\/p>\n<\/li>\n<li>\n<p>formatVar = &#171;DD.MM.YYYY HH:mm&#187;<\/p>\n<\/li>\n<li>\n<p>offsetVar = \u0432\u0440\u0435\u043c\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 &#171;+03:00&#187; (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u0447\u0442\u043e \u043b\u0435\u0436\u0438\u0442 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435, \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u0442\u043e\u043c \u0436\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0435)<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0443\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0437\u0432\u0435\u043d\u044c\u0435\u0432:<\/p>\n<ol>\n<li>\n<p>Component \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 backend, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442:<\/p>\n<ul>\n<li>\n<p>date: &#171;2020-11-17T15:06:47.523Z&#187; =&gt; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f dateVar<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Component \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/p>\n<\/li>\n<li>\n<p>\u0412&nbsp;\u0448\u0430\u0431\u043b\u043e\u043d\u0435 (html) \u0432 \u0431\u043b\u043e\u043a (div) \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044e \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f + angular date pipe<\/p>\n<ul>\n<li>\n<p>dateVar | date : formatVar :&nbsp;offsetVar&nbsp;(\u0441\u043c. \u0414\u0430\u043d\u043e)<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u0432\u043e\u0434 =&gt;&nbsp;2020.11.17 18:06<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e dateVar \u043d\u0430&nbsp;2020.11.17 20:00<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0436\u043c\u0435\u0442 &#171;\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c&#187;<\/p>\n<\/li>\n<li>\n<p>Component \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0434\u0430\u0442\u0443 \u043a \u0444\u043e\u0440\u043c\u0430\u0442\u0443 iso-string (\u0441\u0442\u043e\u0438\u0442 \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0442.\u043a. \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u044b\u043b\u0438 \u043d\u044e\u0430\u043d\u0441\u044b)<\/p>\n<ul>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0438\u0437 FormControl \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 iso-string \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0447\u0430\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430, \u0442\u043e \u0444\u043e\u0440\u043c\u0430\u0442 \u0433\u043e\u0442\u043e\u0432&nbsp;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0438\u0437 FormControl \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 string \u0431\u0435\u0437 \u0447\u0430\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430, \u0442\u043e \u0442\u0443\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u043d\u043e \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u0432\u0441\u0435 \u0441\u0432\u0435\u0434\u0435\u0442\u0441\u044f \u043a `new Date(var \u0441\u044a\u0435\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0441 \u0447\u0430\u0441\u043e\u0432\u044b\u043c \u043f\u043e\u044f\u0441\u043e\u043c).toISOstring()`<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Component \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430&nbsp;backend \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 iso-string \u0441 TZ<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/736224\/\"> https:\/\/habr.com\/ru\/articles\/736224\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043c\u043d\u043e\u0439 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u0411\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u043a\u0430\u043a best practice. \u041a\u0430\u043a \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u0435\u0431\u0435 \u0447\u0430\u0441\u043e\u0432\u044b\u0435 \u043f\u043e\u044f\u0441\u0430 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0441 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c Angular, \u0432\u0432\u0438\u0434\u0443 \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u043d \u0438 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442. \u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0434\u0438\u0432\u044b \u0438 \u0434\u043b\u044f React\/Vue\/&#8230; \u0432 \u0441\u0445\u043e\u0436\u0438\u0445 \u043a\u0435\u0439\u0441\u0430\u0445.<\/p>\n<p>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0433\u043e\u043b\u043e\u0441\u0441\u0430\u0440\u0438\u0439:<\/p>\n<ul>\n<li>\n<p>\u043f\u0430\u0439\u043f (pipe) \u0432 Angular &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435; \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u0430\u043a \u0447\u0438\u0441\u0442\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e<\/p>\n<\/li>\n<li>\n<p>TZ &#8212; time zone &#8212; \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441<\/p>\n<\/li>\n<li>\n<p>DRY &#8212; don&#8217;t repeat yourself<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0432\u0438\u0434\u0443 \u0441\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0440\u0430\u044f \u0438 \u043d\u0435\u044f\u0441\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b frontend \u0438 backend \u0441 \u0434\u0430\u0442\u0430\u043c\u0438 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u0431\u044b\u043b\u0438 \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u044b \u043d\u0430 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043a \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044e:&nbsp;<\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/146109\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/post\/146109\/<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%92%D1%81%D0%B5%D0%BC%D0%B8%D1%80%D0%BD%D0%BE%D0%B5_%D0%BA%D0%BE%D0%BE%D1%80%D0%B4%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5_%D0%B2%D1%80%D0%B5%D0%BC%D1%8F\" rel=\"noopener noreferrer nofollow\">https:\/\/ru.wikipedia.org\/wiki\/%D0%92%D1%81%D0%B5%D0%BC%D0%B8%D1%80%D0%BD%D0%BE%D0%B5_%D0%BA%D0%BE%D0%BE%D1%80%D0%B4%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5_%D0%B2%D1%80%D0%B5%D0%BC%D1%8F<\/a>&nbsp;&#8212; \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 UTC, GMT<\/p>\n<\/li>\n<\/ol>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"351\" width=\"351\">\n<p>\u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<th>\n<p>\u041e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"left\">1. \u041e\u0431\u0449\u0435\u043d\u0438\u0435 \u0444\u0440\u043e\u043d\u0442\u0430 \u0441 \u0431\u044d\u043a\u043e\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 iso-string \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0447\u0430\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 UTC (Z &#8212; \u043c\u0435\u0442\u043a\u0430 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0447\u0430\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430)<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212; \u0432\u0440\u0435\u043c\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0434\u043e\u043b\u0436\u043d\u043e) \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 UTC \u043f\u043e 0 \u043f\u043e\u044f\u0441\u0443 (\u043d\u0435 \u0432\u0430\u0436\u043d\u043e \u044d\u0442\u043e iso-string \u0438\u043b\u0438 timestamp)<\/p>\n<p align=\"left\">&#8212; \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0434\u0430\u0442\u044b \u0441 \u0447\u0430\u0441\u043e\u0432\u044b\u043c \u043f\u043e\u044f\u0441\u043e\u043c, \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c \u043e\u0442 0, \u0432\u0440\u0435\u043c\u044f, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0435 \u0432 \u0431\u0430\u0437\u0443, \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043e \u043a 0 \u0447\u0430\u0441\u043e\u0432\u043e\u043c\u0443 \u043f\u043e\u044f\u0441\u0443 <\/p>\n<p align=\"left\">&#8212; \u0435\u0434\u0438\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0438 \u0448\u043a\u0430\u043b\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438<\/p>\n<p align=\"left\">&#8212; UTC = \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u044b\u0439, \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<p align=\"left\">&#8212; \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u0430\u044f \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0430\u043d\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 UTC \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u0442\u0430\u043b\u043e\u043d\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"left\">2. \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043a\u0438 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0435\u0437\u0434\u0435 \u0433\u0434\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0431\u0440\u0430\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0430 \u043d\u0435 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212; \u0432\u0440\u0435\u043c\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u0432\u0438\u0434\u0443 \u043d\u0435 \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441 UTC)<\/p>\n<p align=\"left\">&#8212; \u0432\u0440\u0435\u043c\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0430\u0432\u0434\u0438\u0432\u043e (\u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"left\">3. \u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u044f\u0441\u0443 \u0434\u043b\u044f \u043c\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 \u0432\u0438\u0434\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f<\/p>\n<p align=\"left\">\u041f\u0440\u0438\u043c\u0435\u0440: &#171;+180&#187; = &#171;+03:00&#187; =  TZ \u041c\u043e\u0441\u043a\u0432\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212; \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 date pipe angular&#8217;\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<p align=\"left\">&#8212; \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043b\u044e\u0441\u0442\u0438 \u0444\u043e\u0440\u043c\u0430\u0442 UTC \u043f\u0440\u0438 \u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c<\/p>\n<p align=\"left\">\n<p>\u041d\u0443\u0436\u043d\u043e \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:&nbsp;<\/p>\n<p align=\"left\">&#8212; number ( \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u0447\u0430\u0441\u0430\u0445 &#171;(+\/-)&nbsp; * 60&#187;)<\/p>\n<p align=\"left\">&#8212; string (\u043f\u0440\u0438\u043c\u0435\u0440, \u041c\u043e\u0441\u043a\u0432\u0430 &#8212; &#171;+03:00&#187;)<\/p>\n<p align=\"left\">\n<p>\u0424\u043e\u0440\u043c\u0430\u0442 \u0442\u0438\u043f\u0430&nbsp;string \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 date pipe \u0432 \u0432\u0438\u0434\u0435 \u043a\u0430\u043a \u0435\u0441\u0442\u044c (\u043f\u0440\u0438\u043c\u0435\u0440: &#171;timeVar | date: &#171;DD:MM:YYYY HH:mm : &#171;+03:00&#187; =&gt; 01.01.2020 11:32; UTC &#8212; 01.01.2020 08:32).<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"left\">4. \u041d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u044b\u0432\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443<\/p>\n<p align=\"left\">\u041f\u0440\u0438\u043c\u0435\u0440: &#171;DD:MM:YYYY HH:mm&#187;<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212; \u0443\u043d\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 DRY<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"left\">5. \u0414\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0432\u044b\u0432\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u044b\u0439 \u043f\u0430\u0439\u043f<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212; \u0443\u043d\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 DRY<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"left\">6. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 iso-string (\u0432 UTC) \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043f\u0440\u0438 \u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">&#8212; \u0435\u0434\u0438\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0438 \u0448\u043a\u0430\u043b\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438<\/p>\n<p align=\"left\">&#8212; \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0438\u0437 iso-string \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443<\/p>\n<p align=\"left\">&#8212; iso-string &#171;\u043a\u0443\u0448\u0430\u044e\u0442&#187; \u0432\u0441\u0435 (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043f\u0440\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0447\u0430\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>\u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Angular (\u0432 \u0446\u0435\u043b\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u0435\u043d \u0431\u0435\u0437 \u0437\u043d\u0430\u043d\u0438\u044f)<\/h4>\n<ul>\n<li>\n<p>Component &#8212; \u043d\u0435\u043a\u0430\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0441 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 (\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 &#8212; .ts \u0444\u0430\u0439\u043b)<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d &#8212; html-\u0444\u0430\u0439\u043b, \u0441\u043e\u0435\u0434\u0438\u043d\u0451\u043d\u043d\u044b\u0439 \u0441 Component<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f \u0432 Angular &#8212; \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438 \u043b\u043e\u0433\u0438\u043a\u0438 (\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435: Component \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430; <a href=\"https:\/\/metanit.com\/web\/angular2\/2.5.php\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435<\/a>)<\/p>\n<\/li>\n<li>\n<p>FormControl &#8212; \u044d\u043b\u0435\u043c\u0435\u043d\u0442 Angular Forms; \u043a\u043b\u0430\u0441\u0441 \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 set, get, \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044b \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438 \u0434\u0440.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u043d\u043e:&nbsp;<\/p>\n<ol>\n<li>\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 (Component) \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c (html)<\/p>\n<\/li>\n<li>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 (backend)<\/p>\n<\/li>\n<li>\n<p>formatVar = &#171;DD.MM.YYYY HH:mm&#187;<\/p>\n<\/li>\n<li>\n<p>offsetVar = \u0432\u0440\u0435\u043c\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 &#171;+03:00&#187; (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u0447\u0442\u043e \u043b\u0435\u0436\u0438\u0442 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435, \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u0442\u043e\u043c \u0436\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0435)<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0443\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0437\u0432\u0435\u043d\u044c\u0435\u0432:<\/p>\n<ol>\n<li>\n<p>Component \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 backend, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442:<\/p>\n<ul>\n<li>\n<p>date: &#171;2020-11-17T15:06:47.523Z&#187; =&gt; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f dateVar<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Component \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/p>\n<\/li>\n<li>\n<p>\u0412&nbsp;\u0448\u0430\u0431\u043b\u043e\u043d\u0435 (html) \u0432 \u0431\u043b\u043e\u043a (div) \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044e \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f + angular date pipe<\/p>\n<ul>\n<li>\n<p>dateVar | date : formatVar :&nbsp;offsetVar&nbsp;(\u0441\u043c. \u0414\u0430\u043d\u043e)<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u0432\u043e\u0434 =&gt;&nbsp;2020.11.17 18:06<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e dateVar \u043d\u0430&nbsp;2020.11.17 20:00<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0436\u043c\u0435\u0442 &#171;\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c&#187;<\/p>\n<\/li>\n<li>\n<p>Component \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0434\u0430\u0442\u0443 \u043a \u0444\u043e\u0440\u043c\u0430\u0442\u0443 iso-string (\u0441\u0442\u043e\u0438\u0442 \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0442.\u043a. \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u044b\u043b\u0438 \u043d\u044e\u0430\u043d\u0441\u044b)<\/p>\n<ul>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0438\u0437 FormControl \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 iso-string \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0447\u0430\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430, \u0442\u043e \u0444\u043e\u0440\u043c\u0430\u0442 \u0433\u043e\u0442\u043e\u0432&nbsp;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0438\u0437 FormControl \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 string \u0431\u0435\u0437 \u0447\u0430\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430, \u0442\u043e \u0442\u0443\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u043d\u043e \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u0432\u0441\u0435 \u0441\u0432\u0435\u0434\u0435\u0442\u0441\u044f \u043a `new Date(var \u0441\u044a\u0435\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0441 \u0447\u0430\u0441\u043e\u0432\u044b\u043c \u043f\u043e\u044f\u0441\u043e\u043c).toISOstring()`<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Component \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430&nbsp;backend \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 iso-string \u0441 TZ<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/736224\/\"> https:\/\/habr.com\/ru\/articles\/736224\/<\/a><br \/><\/br><\/br><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-347640","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/347640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=347640"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/347640\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=347640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=347640"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=347640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}