[{"data":1,"prerenderedAt":2271},["ShallowReactive",2],{"blog-date-time-golang":3,"blog-all-for-related":1777},{"id":4,"title":5,"author":6,"body":7,"cardAlt":5,"categories":1763,"description":1766,"draft":1767,"extension":1768,"headerImage":1769,"keywords":1770,"meta":1771,"name":1772,"navigation":124,"path":1773,"seo":1774,"series":6,"stem":1775,"updated":6,"year":684,"__hash__":1776},"blog\u002Fblog\u002Fdate-time-golang.md","Working with Date and Time in Go",null,{"type":8,"value":9,"toc":1756},"minimark",[10,22,28,35,38,1752],[11,12,13,14,21],"p",{},"In this tutorial we will explore different ways to use time in Go. Golang provides us a package ",[15,16,20],"a",{"href":17,"rel":18},"https:\u002F\u002Fgolang.org\u002Fpkg\u002Ftime\u002F",[19],"nofollow","time"," that provides functionality for measuring and displaying time. This package will be all you need in most of the use cases.",[23,24,25],"blockquote",{},[11,26,27],{},"A Time represents an instant in time with nanosecond precision.",[11,29,30,31],{},"Time in Go is based on location and can be used to display multiple formats (Days, hours, seconds). As per unix timestamp standard, even Go starts its time counter as zero on January 1st, 1970 at UTC. The current timestamp at the time of writing this tutorial is ",[32,33,34],"code",{},"1602249029",[11,36,37],{},"Ok, let’s get started with managing time in Go.",[39,40,41,44,49,59,200,209,215,271,276,301,353,355,359,366,469,472,504,506,510,513,672,675,717,724],"ads",{},[42,43],"hr",{},[45,46,48],"h2",{"id":47},"how-to-get-current-timestamp","How to get current timestamp",[11,50,51,52,55,56,58],{},"The ",[32,53,54],{},"time.Time"," object helps us in getting the computation of time. You don’t want to write a function to compute seconds elapsed since 1st Jan, 1970 every time. This is where the ",[32,57,20],{}," package comes to save you.",[60,61,66],"pre",{"className":62,"code":63,"language":64,"meta":65,"style":65},"language-go shiki shiki-themes github-light github-dark","package main\nimport (\n    \"fmt\"\n    \"time\"\n)\n\nfunc main() {\n    localTimeNow := time.Now()\n    currentSeconds := localTimeNow.Unix()\n    fmt.Println(“Time object: “, localTimeNow)\n    fmt.Println(“Time in seconds: “, currentSeconds)\n}\n","go","",[32,67,68,81,91,104,113,119,126,138,156,172,184,194],{"__ignoreMap":65},[69,70,73,77],"span",{"class":71,"line":72},"line",1,[69,74,76],{"class":75},"szBVR","package",[69,78,80],{"class":79},"sScJk"," main\n",[69,82,84,87],{"class":71,"line":83},2,[69,85,86],{"class":75},"import",[69,88,90],{"class":89},"sVt8B"," (\n",[69,92,94,98,101],{"class":71,"line":93},3,[69,95,97],{"class":96},"sZZnC","    \"",[69,99,100],{"class":79},"fmt",[69,102,103],{"class":96},"\"\n",[69,105,107,109,111],{"class":71,"line":106},4,[69,108,97],{"class":96},[69,110,20],{"class":79},[69,112,103],{"class":96},[69,114,116],{"class":71,"line":115},5,[69,117,118],{"class":89},")\n",[69,120,122],{"class":71,"line":121},6,[69,123,125],{"emptyLinePlaceholder":124},true,"\n",[69,127,129,132,135],{"class":71,"line":128},7,[69,130,131],{"class":75},"func",[69,133,134],{"class":79}," main",[69,136,137],{"class":89},"() {\n",[69,139,141,144,147,150,153],{"class":71,"line":140},8,[69,142,143],{"class":89},"    localTimeNow ",[69,145,146],{"class":75},":=",[69,148,149],{"class":89}," time.",[69,151,152],{"class":79},"Now",[69,154,155],{"class":89},"()\n",[69,157,159,162,164,167,170],{"class":71,"line":158},9,[69,160,161],{"class":89},"    currentSeconds ",[69,163,146],{"class":75},[69,165,166],{"class":89}," localTimeNow.",[69,168,169],{"class":79},"Unix",[69,171,155],{"class":89},[69,173,175,178,181],{"class":71,"line":174},10,[69,176,177],{"class":89},"    fmt.",[69,179,180],{"class":79},"Println",[69,182,183],{"class":89},"(“Time object: “, localTimeNow)\n",[69,185,187,189,191],{"class":71,"line":186},11,[69,188,177],{"class":89},[69,190,180],{"class":79},[69,192,193],{"class":89},"(“Time in seconds: “, currentSeconds)\n",[69,195,197],{"class":71,"line":196},12,[69,198,199],{"class":89},"}\n",[11,201,202,205,206,208],{},[32,203,204],{},"time.Now()"," returns the ",[32,207,54],{}," object. If you look at the output below, you’ll see that the time returned is the current local time. So, this might not be same if you are in different location across the globe.",[11,210,211,214],{},[32,212,213],{},"currentSeconds"," represents the seconds passed since the Unix epoch (1 Jan, 1970 00:00:00).",[60,216,220],{"className":217,"code":218,"language":219,"meta":65,"style":65},"language-bash shiki shiki-themes github-light github-dark","Time object:  2020-10-09 18:52:19.229868 +0530 IST m=+0.000111168\nTime in seconds:  1602249739\nTime in nanoseconds:  205643000\n","bash",[32,221,222,245,259],{"__ignoreMap":65},[69,223,224,227,230,233,236,239,242],{"class":71,"line":72},[69,225,226],{"class":79},"Time",[69,228,229],{"class":96}," object:",[69,231,232],{"class":96},"  2020-10-09",[69,234,235],{"class":96}," 18:52:19.229868",[69,237,238],{"class":96}," +0530",[69,240,241],{"class":96}," IST",[69,243,244],{"class":96}," m=+0.000111168\n",[69,246,247,249,252,255],{"class":71,"line":83},[69,248,226],{"class":79},[69,250,251],{"class":96}," in",[69,253,254],{"class":96}," seconds:",[69,256,258],{"class":257},"sj4cs","  1602249739\n",[69,260,261,263,265,268],{"class":71,"line":93},[69,262,226],{"class":79},[69,264,251],{"class":96},[69,266,267],{"class":96}," nanoseconds:",[69,269,270],{"class":257},"  205643000\n",[272,273,275],"h3",{"id":274},"fetching-day-month-year","Fetching Day, Month, Year",[11,277,278,279,282,283,286,287,290,291,294,295,300],{},"Time object provides a lot of other helper methods. You can use methods like ",[32,280,281],{},"Day()",",",[32,284,285],{},"Month()"," , ",[32,288,289],{},"Year()",", ",[32,292,293],{},"Hour()"," and lot more as per need. Check all available methods ",[15,296,299],{"href":297,"rel":298},"https:\u002F\u002Fgolang.org\u002Fpkg\u002Ftime\u002F#pkg-index",[19],"here",".",[60,302,304],{"className":62,"code":303,"language":64,"meta":65,"style":65},"\u002F\u002F Fetching current Day, Month and Year\ntime.Now().Day()\ntime.Now().Month()\ntime.Now().Year()\n",[32,305,306,312,327,340],{"__ignoreMap":65},[69,307,308],{"class":71,"line":72},[69,309,311],{"class":310},"sJ8bj","\u002F\u002F Fetching current Day, Month and Year\n",[69,313,314,317,319,322,325],{"class":71,"line":83},[69,315,316],{"class":89},"time.",[69,318,152],{"class":79},[69,320,321],{"class":89},"().",[69,323,324],{"class":79},"Day",[69,326,155],{"class":89},[69,328,329,331,333,335,338],{"class":71,"line":93},[69,330,316],{"class":89},[69,332,152],{"class":79},[69,334,321],{"class":89},[69,336,337],{"class":79},"Month",[69,339,155],{"class":89},[69,341,342,344,346,348,351],{"class":71,"line":106},[69,343,316],{"class":89},[69,345,152],{"class":79},[69,347,321],{"class":89},[69,349,350],{"class":79},"Year",[69,352,155],{"class":89},[42,354],{},[45,356,358],{"id":357},"how-to-get-time-from-timestamp","How to get time from timestamp",[11,360,361,362,365],{},"You might want to check date given a timestamp. Since, calculations in timestamp are easy to perform, people prefer converting to timestamp, performing operations and then converting it back to readable date format. We can use ",[32,363,364],{},"Unix()"," method to achieve this.",[60,367,369],{"className":62,"code":368,"language":64,"meta":65,"style":65},"package main\n\nimport (\n    \"fmt\"\n    \"time\"\n)\n\nfunc main() {\n    timestamp := int64(1602254086)\n    date := time.Unix(timestamp, 0)\n    fmt.Println(“Given timestamp to date : “, date)\n}\n\n",[32,370,371,377,381,387,395,403,407,411,419,437,456,465],{"__ignoreMap":65},[69,372,373,375],{"class":71,"line":72},[69,374,76],{"class":75},[69,376,80],{"class":79},[69,378,379],{"class":71,"line":83},[69,380,125],{"emptyLinePlaceholder":124},[69,382,383,385],{"class":71,"line":93},[69,384,86],{"class":75},[69,386,90],{"class":89},[69,388,389,391,393],{"class":71,"line":106},[69,390,97],{"class":96},[69,392,100],{"class":79},[69,394,103],{"class":96},[69,396,397,399,401],{"class":71,"line":115},[69,398,97],{"class":96},[69,400,20],{"class":79},[69,402,103],{"class":96},[69,404,405],{"class":71,"line":121},[69,406,118],{"class":89},[69,408,409],{"class":71,"line":128},[69,410,125],{"emptyLinePlaceholder":124},[69,412,413,415,417],{"class":71,"line":140},[69,414,131],{"class":75},[69,416,134],{"class":79},[69,418,137],{"class":89},[69,420,421,424,426,429,432,435],{"class":71,"line":158},[69,422,423],{"class":89},"    timestamp ",[69,425,146],{"class":75},[69,427,428],{"class":75}," int64",[69,430,431],{"class":89},"(",[69,433,434],{"class":257},"1602254086",[69,436,118],{"class":89},[69,438,439,442,444,446,448,451,454],{"class":71,"line":174},[69,440,441],{"class":89},"    date ",[69,443,146],{"class":75},[69,445,149],{"class":89},[69,447,169],{"class":79},[69,449,450],{"class":89},"(timestamp, ",[69,452,453],{"class":257},"0",[69,455,118],{"class":89},[69,457,458,460,462],{"class":71,"line":186},[69,459,177],{"class":89},[69,461,180],{"class":79},[69,463,464],{"class":89},"(“Given timestamp to date : “, date)\n",[69,466,467],{"class":71,"line":196},[69,468,199],{"class":89},[11,470,471],{},"The above code results in date for given timestamp -",[60,473,475],{"className":217,"code":474,"language":219,"meta":65,"style":65},"Given timestamp to date :  2020-10-09 20:04:46 +0530 IST\n",[32,476,477],{"__ignoreMap":65},[69,478,479,482,485,488,491,494,496,499,501],{"class":71,"line":72},[69,480,481],{"class":79},"Given",[69,483,484],{"class":96}," timestamp",[69,486,487],{"class":96}," to",[69,489,490],{"class":96}," date",[69,492,493],{"class":96}," :",[69,495,232],{"class":96},[69,497,498],{"class":96}," 20:04:46",[69,500,238],{"class":96},[69,502,503],{"class":96}," IST\n",[42,505],{},[45,507,509],{"id":508},"time-is-standard-formats","Time is standard formats",[11,511,512],{},"Time package provide number of formats in which time can be parsed. Let’s look at an example -",[60,514,516],{"className":62,"code":515,"language":64,"meta":65,"style":65},"package main\n\nimport (\n    \"fmt\"\n    \"time\"\n)\n\nconst (\n    ISOformat    = \"2006-01-02\"\n    USformat     = \"January 2, 2006\"\n    RFC850format = \"Monday, 02-Jan-06 15:04:05 UTC\"\n)\n\nfunc main() {\n    date := “2020-10-09\"\n    timeInISOformat, _ := time.Parse(ISOformat, date)\n    fmt.Println(timeInISOformat)\n    fmt.Println(timeInISOformat.Format(USformat))\n    fmt.Println(timeInISOformat.Format(RFC850format))\n}\n\n",[32,517,518,524,528,534,542,550,554,558,565,576,587,598,602,607,616,643,649,655,661,667],{"__ignoreMap":65},[69,519,520,522],{"class":71,"line":72},[69,521,76],{"class":75},[69,523,80],{"class":79},[69,525,526],{"class":71,"line":83},[69,527,125],{"emptyLinePlaceholder":124},[69,529,530,532],{"class":71,"line":93},[69,531,86],{"class":75},[69,533,90],{"class":89},[69,535,536,538,540],{"class":71,"line":106},[69,537,97],{"class":96},[69,539,100],{"class":79},[69,541,103],{"class":96},[69,543,544,546,548],{"class":71,"line":115},[69,545,97],{"class":96},[69,547,20],{"class":79},[69,549,103],{"class":96},[69,551,552],{"class":71,"line":121},[69,553,118],{"class":89},[69,555,556],{"class":71,"line":128},[69,557,125],{"emptyLinePlaceholder":124},[69,559,560,563],{"class":71,"line":140},[69,561,562],{"class":75},"const",[69,564,90],{"class":89},[69,566,567,570,573],{"class":71,"line":158},[69,568,569],{"class":257},"    ISOformat",[69,571,572],{"class":75},"    =",[69,574,575],{"class":96}," \"2006-01-02\"\n",[69,577,578,581,584],{"class":71,"line":174},[69,579,580],{"class":257},"    USformat",[69,582,583],{"class":75},"     =",[69,585,586],{"class":96}," \"January 2, 2006\"\n",[69,588,589,592,595],{"class":71,"line":186},[69,590,591],{"class":257},"    RFC850format",[69,593,594],{"class":75}," =",[69,596,597],{"class":96}," \"Monday, 02-Jan-06 15:04:05 UTC\"\n",[69,599,600],{"class":71,"line":196},[69,601,118],{"class":89},[69,603,605],{"class":71,"line":604},13,[69,606,125],{"emptyLinePlaceholder":124},[69,608,610,612,614],{"class":71,"line":609},14,[69,611,131],{"class":75},[69,613,134],{"class":79},[69,615,137],{"class":89},[69,617,619,621,623,626,629,632,635,637,641],{"class":71,"line":618},15,[69,620,441],{"class":89},[69,622,146],{"class":75},[69,624,625],{"class":89}," “",[69,627,628],{"class":257},"2020",[69,630,631],{"class":75},"-",[69,633,634],{"class":257},"10",[69,636,631],{"class":75},[69,638,640],{"class":639},"s7hpK","09",[69,642,103],{"class":96},[69,644,646],{"class":71,"line":645},16,[69,647,648],{"class":96},"    timeInISOformat, _ := time.Parse(ISOformat, date)\n",[69,650,652],{"class":71,"line":651},17,[69,653,654],{"class":96},"    fmt.Println(timeInISOformat)\n",[69,656,658],{"class":71,"line":657},18,[69,659,660],{"class":96},"    fmt.Println(timeInISOformat.Format(USformat))\n",[69,662,664],{"class":71,"line":663},19,[69,665,666],{"class":96},"    fmt.Println(timeInISOformat.Format(RFC850format))\n",[69,668,670],{"class":71,"line":669},20,[69,671,199],{"class":96},[11,673,674],{},"The output for above code will be -",[60,676,678],{"className":217,"code":677,"language":219,"meta":65,"style":65},"2020-10-09 00:00:00 +0000 UTC\nOctober 9, 2020\nFriday, 09-Oct-20 00:00:00 UTC\n",[32,679,680,694,705],{"__ignoreMap":65},[69,681,682,685,688,691],{"class":71,"line":72},[69,683,684],{"class":79},"2020-10-09",[69,686,687],{"class":96}," 00:00:00",[69,689,690],{"class":96}," +0000",[69,692,693],{"class":96}," UTC\n",[69,695,696,699,702],{"class":71,"line":83},[69,697,698],{"class":79},"October",[69,700,701],{"class":96}," 9,",[69,703,704],{"class":257}," 2020\n",[69,706,707,710,713,715],{"class":71,"line":93},[69,708,709],{"class":79},"Friday,",[69,711,712],{"class":96}," 09-Oct-20",[69,714,687],{"class":96},[69,716,693],{"class":96},[11,718,719,720,300],{},"You can find other available formats ",[15,721,299],{"href":722,"rel":723},"https:\u002F\u002Fgolang.org\u002Fpkg\u002Ftime\u002F#pkg-constants",[19],[39,725,726,728,732,746,994,997,1078,1082,1089,1242,1244,1248,1251,1268,1271,1579,1582,1679,1681,1685,1688,1706,1710,1733,1735,1738,1747],{},[42,727],{},[45,729,731],{"id":730},"how-to-get-time-at-certain-locationtimezones","How to get time at certain location\u002Ftimezones",[11,733,51,734,736,737,740,741,745],{},[32,735,54],{}," objects has a ",[32,738,739],{},"loc *Location"," attribute which helps us fetching time at certain timezones. Let’s see how to use this with an example.\n",[742,743,744],"strong",{},"Note:"," The nil location means UTC.",[60,747,749],{"className":62,"code":748,"language":64,"meta":65,"style":65},"package main\n\nimport (\n    \"fmt\"\n    \"time\"\n)\n\nconst (\n    timezoneJakarta = \"Asia\u002FJakarta\"\n    timezoneAmerica = \"America\u002FNew_York\"\n)\n\nfunc main() {\n    \u002F\u002F Current local time (India for me)\n    localTimeNow := time.Now()\n    fmt.Println(“Local time in India is: “, localTimeNow)\n\n    jakartaLoc, err := time.LoadLocation(timezoneJakarta)\n    if err != nil {\n        fmt.Println(err)\n    }\n    fmt.Println(“Local time in Jakarta is: “, localTimeNow.In(jakartaLoc))\n\n    americaLoc, err := time.LoadLocation(timezoneAmerica)\n    if err != nil {\n        fmt.Println(err)\n    }\n    fmt.Println(“Local time in US is: “, localTimeNow.In(americaLoc))\n}\n\n",[32,750,751,757,761,767,775,783,787,791,797,807,817,821,825,833,838,850,859,863,878,895,905,911,927,932,947,960,969,974,989],{"__ignoreMap":65},[69,752,753,755],{"class":71,"line":72},[69,754,76],{"class":75},[69,756,80],{"class":79},[69,758,759],{"class":71,"line":83},[69,760,125],{"emptyLinePlaceholder":124},[69,762,763,765],{"class":71,"line":93},[69,764,86],{"class":75},[69,766,90],{"class":89},[69,768,769,771,773],{"class":71,"line":106},[69,770,97],{"class":96},[69,772,100],{"class":79},[69,774,103],{"class":96},[69,776,777,779,781],{"class":71,"line":115},[69,778,97],{"class":96},[69,780,20],{"class":79},[69,782,103],{"class":96},[69,784,785],{"class":71,"line":121},[69,786,118],{"class":89},[69,788,789],{"class":71,"line":128},[69,790,125],{"emptyLinePlaceholder":124},[69,792,793,795],{"class":71,"line":140},[69,794,562],{"class":75},[69,796,90],{"class":89},[69,798,799,802,804],{"class":71,"line":158},[69,800,801],{"class":257},"    timezoneJakarta",[69,803,594],{"class":75},[69,805,806],{"class":96}," \"Asia\u002FJakarta\"\n",[69,808,809,812,814],{"class":71,"line":174},[69,810,811],{"class":257},"    timezoneAmerica",[69,813,594],{"class":75},[69,815,816],{"class":96}," \"America\u002FNew_York\"\n",[69,818,819],{"class":71,"line":186},[69,820,118],{"class":89},[69,822,823],{"class":71,"line":196},[69,824,125],{"emptyLinePlaceholder":124},[69,826,827,829,831],{"class":71,"line":604},[69,828,131],{"class":75},[69,830,134],{"class":79},[69,832,137],{"class":89},[69,834,835],{"class":71,"line":609},[69,836,837],{"class":310},"    \u002F\u002F Current local time (India for me)\n",[69,839,840,842,844,846,848],{"class":71,"line":618},[69,841,143],{"class":89},[69,843,146],{"class":75},[69,845,149],{"class":89},[69,847,152],{"class":79},[69,849,155],{"class":89},[69,851,852,854,856],{"class":71,"line":645},[69,853,177],{"class":89},[69,855,180],{"class":79},[69,857,858],{"class":89},"(“Local time in India is: “, localTimeNow)\n",[69,860,861],{"class":71,"line":651},[69,862,125],{"emptyLinePlaceholder":124},[69,864,865,868,870,872,875],{"class":71,"line":657},[69,866,867],{"class":89},"    jakartaLoc, err ",[69,869,146],{"class":75},[69,871,149],{"class":89},[69,873,874],{"class":79},"LoadLocation",[69,876,877],{"class":89},"(timezoneJakarta)\n",[69,879,880,883,886,889,892],{"class":71,"line":663},[69,881,882],{"class":75},"    if",[69,884,885],{"class":89}," err ",[69,887,888],{"class":75},"!=",[69,890,891],{"class":257}," nil",[69,893,894],{"class":89}," {\n",[69,896,897,900,902],{"class":71,"line":669},[69,898,899],{"class":89},"        fmt.",[69,901,180],{"class":79},[69,903,904],{"class":89},"(err)\n",[69,906,908],{"class":71,"line":907},21,[69,909,910],{"class":89},"    }\n",[69,912,914,916,918,921,924],{"class":71,"line":913},22,[69,915,177],{"class":89},[69,917,180],{"class":79},[69,919,920],{"class":89},"(“Local time in Jakarta is: “, localTimeNow.",[69,922,923],{"class":79},"In",[69,925,926],{"class":89},"(jakartaLoc))\n",[69,928,930],{"class":71,"line":929},23,[69,931,125],{"emptyLinePlaceholder":124},[69,933,935,938,940,942,944],{"class":71,"line":934},24,[69,936,937],{"class":89},"    americaLoc, err ",[69,939,146],{"class":75},[69,941,149],{"class":89},[69,943,874],{"class":79},[69,945,946],{"class":89},"(timezoneAmerica)\n",[69,948,950,952,954,956,958],{"class":71,"line":949},25,[69,951,882],{"class":75},[69,953,885],{"class":89},[69,955,888],{"class":75},[69,957,891],{"class":257},[69,959,894],{"class":89},[69,961,963,965,967],{"class":71,"line":962},26,[69,964,899],{"class":89},[69,966,180],{"class":79},[69,968,904],{"class":89},[69,970,972],{"class":71,"line":971},27,[69,973,910],{"class":89},[69,975,977,979,981,984,986],{"class":71,"line":976},28,[69,978,177],{"class":89},[69,980,180],{"class":79},[69,982,983],{"class":89},"(“Local time in US is: “, localTimeNow.",[69,985,923],{"class":79},[69,987,988],{"class":89},"(americaLoc))\n",[69,990,992],{"class":71,"line":991},29,[69,993,199],{"class":89},[11,995,996],{},"The above code will print current time in different timezones -",[60,998,1000],{"className":217,"code":999,"language":219,"meta":65,"style":65},"Local time in India is:  2020-10-09 19:31:51.771828 +0530 IST m=+0.000088151\nLocal time in Jakarta is:  2020-10-09 21:01:51.771828 +0700 WIB\nLocal time in US is:  2020-10-09 10:01:51.771828 -0400 EDT\n\n",[32,1001,1002,1030,1054],{"__ignoreMap":65},[69,1003,1004,1007,1010,1012,1015,1018,1020,1023,1025,1027],{"class":71,"line":72},[69,1005,1006],{"class":79},"Local",[69,1008,1009],{"class":96}," time",[69,1011,251],{"class":96},[69,1013,1014],{"class":96}," India",[69,1016,1017],{"class":96}," is:",[69,1019,232],{"class":96},[69,1021,1022],{"class":96}," 19:31:51.771828",[69,1024,238],{"class":96},[69,1026,241],{"class":96},[69,1028,1029],{"class":96}," m=+0.000088151\n",[69,1031,1032,1034,1036,1038,1041,1043,1045,1048,1051],{"class":71,"line":83},[69,1033,1006],{"class":79},[69,1035,1009],{"class":96},[69,1037,251],{"class":96},[69,1039,1040],{"class":96}," Jakarta",[69,1042,1017],{"class":96},[69,1044,232],{"class":96},[69,1046,1047],{"class":96}," 21:01:51.771828",[69,1049,1050],{"class":96}," +0700",[69,1052,1053],{"class":96}," WIB\n",[69,1055,1056,1058,1060,1062,1065,1067,1069,1072,1075],{"class":71,"line":93},[69,1057,1006],{"class":79},[69,1059,1009],{"class":96},[69,1061,251],{"class":96},[69,1063,1064],{"class":96}," US",[69,1066,1017],{"class":96},[69,1068,232],{"class":96},[69,1070,1071],{"class":96}," 10:01:51.771828",[69,1073,1074],{"class":257}," -0400",[69,1076,1077],{"class":96}," EDT\n",[272,1079,1081],{"id":1080},"time-in-utc-ist-and-other-timezones","Time in UTC, IST and other timezones",[11,1083,1084,1085,1088],{},"In place of specifying full timezone location we can also provide various time in short formats like UTC, IST, EST, MST etc. You can even fetch your current zone using ",[32,1086,1087],{},"Zone()"," method.",[60,1090,1092],{"className":62,"code":1091,"language":64,"meta":65,"style":65},"package main\n\nimport (\n    \"fmt\"\n    \"time\"\n)\n\nfunc main() {\n    currentZone, offset := time.Now().Zone()\n    fmt.Println(“Your Timezone : “, currentZone)\n    fmt.Println(“Offset in seconds from UTC: “, offset)\n\n    utcLoc, err := time.LoadLocation(“UTC”)\n    if err != nil {\n        fmt.Println(err)\n    }\n    fmt.Println(“Local time UTC is: “, time.Now().In(utcLoc))\n}\n\n",[32,1093,1094,1100,1104,1110,1118,1126,1130,1134,1142,1160,1169,1178,1182,1196,1208,1216,1220,1238],{"__ignoreMap":65},[69,1095,1096,1098],{"class":71,"line":72},[69,1097,76],{"class":75},[69,1099,80],{"class":79},[69,1101,1102],{"class":71,"line":83},[69,1103,125],{"emptyLinePlaceholder":124},[69,1105,1106,1108],{"class":71,"line":93},[69,1107,86],{"class":75},[69,1109,90],{"class":89},[69,1111,1112,1114,1116],{"class":71,"line":106},[69,1113,97],{"class":96},[69,1115,100],{"class":79},[69,1117,103],{"class":96},[69,1119,1120,1122,1124],{"class":71,"line":115},[69,1121,97],{"class":96},[69,1123,20],{"class":79},[69,1125,103],{"class":96},[69,1127,1128],{"class":71,"line":121},[69,1129,118],{"class":89},[69,1131,1132],{"class":71,"line":128},[69,1133,125],{"emptyLinePlaceholder":124},[69,1135,1136,1138,1140],{"class":71,"line":140},[69,1137,131],{"class":75},[69,1139,134],{"class":79},[69,1141,137],{"class":89},[69,1143,1144,1147,1149,1151,1153,1155,1158],{"class":71,"line":158},[69,1145,1146],{"class":89},"    currentZone, offset ",[69,1148,146],{"class":75},[69,1150,149],{"class":89},[69,1152,152],{"class":79},[69,1154,321],{"class":89},[69,1156,1157],{"class":79},"Zone",[69,1159,155],{"class":89},[69,1161,1162,1164,1166],{"class":71,"line":174},[69,1163,177],{"class":89},[69,1165,180],{"class":79},[69,1167,1168],{"class":89},"(“Your Timezone : “, currentZone)\n",[69,1170,1171,1173,1175],{"class":71,"line":186},[69,1172,177],{"class":89},[69,1174,180],{"class":79},[69,1176,1177],{"class":89},"(“Offset in seconds from UTC: “, offset)\n",[69,1179,1180],{"class":71,"line":196},[69,1181,125],{"emptyLinePlaceholder":124},[69,1183,1184,1187,1189,1191,1193],{"class":71,"line":604},[69,1185,1186],{"class":89},"    utcLoc, err ",[69,1188,146],{"class":75},[69,1190,149],{"class":89},[69,1192,874],{"class":79},[69,1194,1195],{"class":89},"(“UTC”)\n",[69,1197,1198,1200,1202,1204,1206],{"class":71,"line":609},[69,1199,882],{"class":75},[69,1201,885],{"class":89},[69,1203,888],{"class":75},[69,1205,891],{"class":257},[69,1207,894],{"class":89},[69,1209,1210,1212,1214],{"class":71,"line":618},[69,1211,899],{"class":89},[69,1213,180],{"class":79},[69,1215,904],{"class":89},[69,1217,1218],{"class":71,"line":645},[69,1219,910],{"class":89},[69,1221,1222,1224,1226,1229,1231,1233,1235],{"class":71,"line":651},[69,1223,177],{"class":89},[69,1225,180],{"class":79},[69,1227,1228],{"class":89},"(“Local time UTC is: “, time.",[69,1230,152],{"class":79},[69,1232,321],{"class":89},[69,1234,923],{"class":79},[69,1236,1237],{"class":89},"(utcLoc))\n",[69,1239,1240],{"class":71,"line":657},[69,1241,199],{"class":89},[42,1243],{},[45,1245,1247],{"id":1246},"how-to-modify-date","How to modify date",[11,1249,1250],{},"There are multiple ways to achieve this. Two common one are -",[1252,1253,1254,1258],"ol",{},[1255,1256,1257],"li",{},"Converting to timestamp (seconds) and then easily modifying date by adding\u002Fsubtracting seconds.",[1255,1259,1260,1261,1264,1265,1267],{},"Using ",[32,1262,1263],{},"AddDate()"," method from ",[32,1266,20],{}," package",[11,1269,1270],{},"Let’s see how it works -",[60,1272,1274],{"className":62,"code":1273,"language":64,"meta":65,"style":65},"package main\n\nimport (\n    \"fmt\"\n    \"time\"\n)\n\nfunc main() {\n    t := time.Now()\n\n    \u002F\u002F Using AddDate() method\n    tomorrow := t.AddDate(0, 0, 1)\n    yesterday := t.AddDate(0, 0, -1)\n    nextMonth := t.AddDate(0, 1, 0)\n    nextYear := t.AddDate(1, 0, 0)\n\n    fmt.Println(“Tomorrow using AddDate(): “, tomorrow)\n    fmt.Println(“Yesterday: “, yesterday)\n    fmt.Println(“Next Month: “, nextMonth)\n    fmt.Println(“Next Year: “, nextYear)\n\n    \u002F\u002F Using timestamp\n    timestamp := t.Unix()\n    timestampTomorrow := timestamp + 24*60*60\n    tomorrow = time.Unix(timestampTomorrow, 0)\n\n    fmt.Println(“Tomorrow using timestamp: “, tomorrow)\n}\n\n",[32,1275,1276,1282,1286,1292,1300,1308,1312,1316,1324,1337,1341,1346,1374,1401,1426,1451,1455,1469,1478,1487,1496,1500,1505,1517,1544,1562,1566,1575],{"__ignoreMap":65},[69,1277,1278,1280],{"class":71,"line":72},[69,1279,76],{"class":75},[69,1281,80],{"class":79},[69,1283,1284],{"class":71,"line":83},[69,1285,125],{"emptyLinePlaceholder":124},[69,1287,1288,1290],{"class":71,"line":93},[69,1289,86],{"class":75},[69,1291,90],{"class":89},[69,1293,1294,1296,1298],{"class":71,"line":106},[69,1295,97],{"class":96},[69,1297,100],{"class":79},[69,1299,103],{"class":96},[69,1301,1302,1304,1306],{"class":71,"line":115},[69,1303,97],{"class":96},[69,1305,20],{"class":79},[69,1307,103],{"class":96},[69,1309,1310],{"class":71,"line":121},[69,1311,118],{"class":89},[69,1313,1314],{"class":71,"line":128},[69,1315,125],{"emptyLinePlaceholder":124},[69,1317,1318,1320,1322],{"class":71,"line":140},[69,1319,131],{"class":75},[69,1321,134],{"class":79},[69,1323,137],{"class":89},[69,1325,1326,1329,1331,1333,1335],{"class":71,"line":158},[69,1327,1328],{"class":89},"    t ",[69,1330,146],{"class":75},[69,1332,149],{"class":89},[69,1334,152],{"class":79},[69,1336,155],{"class":89},[69,1338,1339],{"class":71,"line":174},[69,1340,125],{"emptyLinePlaceholder":124},[69,1342,1343],{"class":71,"line":186},[69,1344,1345],{"class":310},"    \u002F\u002F Using AddDate() method\n",[69,1347,1348,1351,1353,1356,1359,1361,1363,1365,1367,1369,1372],{"class":71,"line":196},[69,1349,1350],{"class":89},"    tomorrow ",[69,1352,146],{"class":75},[69,1354,1355],{"class":89}," t.",[69,1357,1358],{"class":79},"AddDate",[69,1360,431],{"class":89},[69,1362,453],{"class":257},[69,1364,290],{"class":89},[69,1366,453],{"class":257},[69,1368,290],{"class":89},[69,1370,1371],{"class":257},"1",[69,1373,118],{"class":89},[69,1375,1376,1379,1381,1383,1385,1387,1389,1391,1393,1395,1397,1399],{"class":71,"line":604},[69,1377,1378],{"class":89},"    yesterday ",[69,1380,146],{"class":75},[69,1382,1355],{"class":89},[69,1384,1358],{"class":79},[69,1386,431],{"class":89},[69,1388,453],{"class":257},[69,1390,290],{"class":89},[69,1392,453],{"class":257},[69,1394,290],{"class":89},[69,1396,631],{"class":75},[69,1398,1371],{"class":257},[69,1400,118],{"class":89},[69,1402,1403,1406,1408,1410,1412,1414,1416,1418,1420,1422,1424],{"class":71,"line":609},[69,1404,1405],{"class":89},"    nextMonth ",[69,1407,146],{"class":75},[69,1409,1355],{"class":89},[69,1411,1358],{"class":79},[69,1413,431],{"class":89},[69,1415,453],{"class":257},[69,1417,290],{"class":89},[69,1419,1371],{"class":257},[69,1421,290],{"class":89},[69,1423,453],{"class":257},[69,1425,118],{"class":89},[69,1427,1428,1431,1433,1435,1437,1439,1441,1443,1445,1447,1449],{"class":71,"line":618},[69,1429,1430],{"class":89},"    nextYear ",[69,1432,146],{"class":75},[69,1434,1355],{"class":89},[69,1436,1358],{"class":79},[69,1438,431],{"class":89},[69,1440,1371],{"class":257},[69,1442,290],{"class":89},[69,1444,453],{"class":257},[69,1446,290],{"class":89},[69,1448,453],{"class":257},[69,1450,118],{"class":89},[69,1452,1453],{"class":71,"line":645},[69,1454,125],{"emptyLinePlaceholder":124},[69,1456,1457,1459,1461,1464,1466],{"class":71,"line":651},[69,1458,177],{"class":89},[69,1460,180],{"class":79},[69,1462,1463],{"class":89},"(“Tomorrow using ",[69,1465,1358],{"class":79},[69,1467,1468],{"class":89},"(): “, tomorrow)\n",[69,1470,1471,1473,1475],{"class":71,"line":657},[69,1472,177],{"class":89},[69,1474,180],{"class":79},[69,1476,1477],{"class":89},"(“Yesterday: “, yesterday)\n",[69,1479,1480,1482,1484],{"class":71,"line":663},[69,1481,177],{"class":89},[69,1483,180],{"class":79},[69,1485,1486],{"class":89},"(“Next Month: “, nextMonth)\n",[69,1488,1489,1491,1493],{"class":71,"line":669},[69,1490,177],{"class":89},[69,1492,180],{"class":79},[69,1494,1495],{"class":89},"(“Next Year: “, nextYear)\n",[69,1497,1498],{"class":71,"line":907},[69,1499,125],{"emptyLinePlaceholder":124},[69,1501,1502],{"class":71,"line":913},[69,1503,1504],{"class":310},"    \u002F\u002F Using timestamp\n",[69,1506,1507,1509,1511,1513,1515],{"class":71,"line":929},[69,1508,423],{"class":89},[69,1510,146],{"class":75},[69,1512,1355],{"class":89},[69,1514,169],{"class":79},[69,1516,155],{"class":89},[69,1518,1519,1522,1524,1527,1530,1533,1536,1539,1541],{"class":71,"line":934},[69,1520,1521],{"class":89},"    timestampTomorrow ",[69,1523,146],{"class":75},[69,1525,1526],{"class":89}," timestamp ",[69,1528,1529],{"class":75},"+",[69,1531,1532],{"class":257}," 24",[69,1534,1535],{"class":75},"*",[69,1537,1538],{"class":257},"60",[69,1540,1535],{"class":75},[69,1542,1543],{"class":257},"60\n",[69,1545,1546,1548,1551,1553,1555,1558,1560],{"class":71,"line":949},[69,1547,1350],{"class":89},[69,1549,1550],{"class":75},"=",[69,1552,149],{"class":89},[69,1554,169],{"class":79},[69,1556,1557],{"class":89},"(timestampTomorrow, ",[69,1559,453],{"class":257},[69,1561,118],{"class":89},[69,1563,1564],{"class":71,"line":962},[69,1565,125],{"emptyLinePlaceholder":124},[69,1567,1568,1570,1572],{"class":71,"line":971},[69,1569,177],{"class":89},[69,1571,180],{"class":79},[69,1573,1574],{"class":89},"(“Tomorrow using timestamp: “, tomorrow)\n",[69,1576,1577],{"class":71,"line":976},[69,1578,199],{"class":89},[11,1580,1581],{},"The above code prints next day, month and year and explores both method to achieve this.",[60,1583,1585],{"className":217,"code":1584,"language":219,"meta":65,"style":65},"Tomorrow using AddDate():  2020-10-10 19:58:09.701298 +0530 IST\nYesterday:  2020-10-08 19:58:09.701298 +0530 IST\nNext Month:  2020-11-09 19:58:09.701298 +0530 IST\nNext Year:  2021-10-09 19:58:09.701298 +0530 IST\nTomorrow using timestamp:  2020-10-10 19:58:09 +0530 IST\n\n",[32,1586,1587,1614,1628,1645,1661],{"__ignoreMap":65},[69,1588,1589,1592,1595,1598,1601,1604,1607,1610,1612],{"class":71,"line":72},[69,1590,1591],{"class":79},"Tomorrow",[69,1593,1594],{"class":96}," using",[69,1596,1597],{"class":96}," AddDate",[69,1599,1600],{"class":89},"()",[69,1602,1603],{"class":96},":",[69,1605,1606],{"class":96},"  2020-10-10",[69,1608,1609],{"class":96}," 19:58:09.701298",[69,1611,238],{"class":96},[69,1613,503],{"class":96},[69,1615,1616,1619,1622,1624,1626],{"class":71,"line":83},[69,1617,1618],{"class":79},"Yesterday:",[69,1620,1621],{"class":96},"  2020-10-08",[69,1623,1609],{"class":96},[69,1625,238],{"class":96},[69,1627,503],{"class":96},[69,1629,1630,1633,1636,1639,1641,1643],{"class":71,"line":93},[69,1631,1632],{"class":79},"Next",[69,1634,1635],{"class":96}," Month:",[69,1637,1638],{"class":96},"  2020-11-09",[69,1640,1609],{"class":96},[69,1642,238],{"class":96},[69,1644,503],{"class":96},[69,1646,1647,1649,1652,1655,1657,1659],{"class":71,"line":106},[69,1648,1632],{"class":79},[69,1650,1651],{"class":96}," Year:",[69,1653,1654],{"class":96},"  2021-10-09",[69,1656,1609],{"class":96},[69,1658,238],{"class":96},[69,1660,503],{"class":96},[69,1662,1663,1665,1667,1670,1672,1675,1677],{"class":71,"line":115},[69,1664,1591],{"class":79},[69,1666,1594],{"class":96},[69,1668,1669],{"class":96}," timestamp:",[69,1671,1606],{"class":96},[69,1673,1674],{"class":96}," 19:58:09",[69,1676,238],{"class":96},[69,1678,503],{"class":96},[42,1680],{},[45,1682,1684],{"id":1683},"resources","Resources",[11,1686,1687],{},"There is a lot more to learn about Git which is out of scope for this basic articles. Here are some of the resources to learn.",[1689,1690,1691,1698],"ul",{},[1255,1692,1693],{},[15,1694,1697],{"href":1695,"rel":1696},"https:\u002F\u002Fgolang.org\u002Fpkg\u002Ftime",[19],"Time package",[1255,1699,1700,1705],{},[15,1701,1704],{"href":1702,"rel":1703},"https:\u002F\u002Fwww.epochconverter.com\u002F",[19],"Epoch Time converter"," - Handy tool to check and convert timestamps",[272,1707,1709],{"id":1708},"books-to-learn-golang","Books to learn Golang",[1689,1711,1712,1719,1726],{},[1255,1713,1714],{},[15,1715,1718],{"href":1716,"rel":1717},"https:\u002F\u002Famzn.to\u002F3fYLCqz",[19],"Go Programming Language",[1255,1720,1721],{},[15,1722,1725],{"href":1723,"rel":1724},"https:\u002F\u002Famzn.to\u002F3s7fWS3",[19],"Learning Go",[1255,1727,1728],{},[15,1729,1732],{"href":1730,"rel":1731},"https:\u002F\u002Famzn.to\u002F3t6PM37",[19],"Go in Action",[42,1734],{},[11,1736,1737],{},"I hope you learned something new. Feel free to suggest improvements ✔️",[11,1739,1740,1741,1746],{},"I share regular updates and resources on ",[15,1742,1745],{"href":1743,"rel":1744},"https:\u002F\u002Ftwitter.com\u002Fmkfeuhrer",[19],"Twitter",". Let's connect!",[11,1748,1749],{},[742,1750,1751],{},"Keep exploring 🔎 Keep learning 🚀",[1753,1754,1755],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":65,"searchDepth":83,"depth":83,"links":1757},[1758,1761,1762],{"id":47,"depth":83,"text":48,"children":1759},[1760],{"id":274,"depth":93,"text":275},{"id":357,"depth":83,"text":358},{"id":508,"depth":83,"text":509},[1764,1765],"Golang","Programming","Learn how to use time in Golang - Multiple formats, locations and using date.",false,"md","blog\u002Fdate-time-golang\u002Fdate-time-golang-card.webp","date time golang, time format golang, add date golang, golang current timestamp",{},"date-time-golang","\u002Fblog\u002Fdate-time-golang",{"title":5,"description":1766},"blog\u002Fdate-time-golang","C75xNIqsFdDKqC33cC77229Z04ZKnjMo-_6HBwLO3z8",[1778,1785,1791,1799,1808,1815,1822,1829,1831,1837,1843,1849,1855,1865,1871,1878,1885,1892,1898,1905,1911,1917,1923,1929,1935,1941,1947,1953,1960,1967,1973,1979,1985,1991,1997,2003,2009,2015,2021,2027,2033,2039,2045,2052,2058,2064,2070,2077,2083,2089,2096,2103,2109,2116,2122,2129,2135,2142,2148,2154,2160,2166,2172,2178,2184,2190,2196,2202,2208,2214,2221,2227,2234,2240,2246,2252,2259,2265],{"path":1779,"title":1780,"description":1781,"categories":1782,"draft":124,"year":1784,"series":6},"\u002Fblog\u002Fai-assisted-workstation","Building an AI-Assisted Personal Workstation","How I built a personal AI workstation: markdown knowledge base, portable agent skills, handoff-driven sessions. What worked, what broke, what I would change.",[1783,1765],"Productivity","2026-08-26",{"path":1786,"title":1787,"description":1788,"categories":1789,"draft":1767,"year":1790,"series":6},"\u002Fblog\u002Faws-s3-golang","Uploading images to AWS S3 in Golang","In this tutorial I cover how to upload, fetch and manage other operations for objects on AWS S3 in Golang",[1764,1765],"2020-01-12",{"path":1792,"title":1793,"description":1794,"categories":1795,"draft":1767,"year":1798,"series":6},"\u002Fblog\u002Fbooks-for-engineers","Best Books for Software Engineers","Best Books to help you build you software engineering career - ranging from fundamentats, interview prep to productivity.",[1796,1797],"Books","Life","2021-12-26",{"path":1800,"title":1801,"description":1802,"categories":1803,"draft":1767,"year":1807,"series":6},"\u002Fblog\u002Fbuilding-acrons","Building Acrons 🚀","Building Acrons, a one-stop tool to decode everyday acronyms like DIY, FOMO, and BRB without losing your flow.",[1804,1805,1806],"Side Projects","Web","Tools","2020-05-26",{"path":1809,"title":1810,"description":1811,"categories":1812,"draft":1767,"year":1814,"series":6},"\u002Fblog\u002Fcap-theorem","CAP Theorem Explained","Learn the concept and misconceptions around popular CAP theorem in system design.",[1813,1765],"System Design","2021-07-26",{"path":1816,"title":1817,"description":1818,"categories":1819,"draft":1767,"year":1821,"series":6},"\u002Fblog\u002Fcode-reviews","Code Review Checklist","Why code reviews matter, and best practices that catch bugs early and keep code quality high before merge.",[1820],"Engineering Principles","2020-07-20",{"path":1823,"title":1824,"description":1825,"categories":1826,"draft":1767,"year":1828,"series":6},"\u002Fblog\u002Fdark-mode","Add Dark mode to websites","Dark mode is ❤️️ Add it to your websites with little CSS and JS",[1827,1805],"Javascript","2020-07-04",{"path":1773,"title":5,"description":1766,"categories":1830,"draft":1767,"year":684,"series":6},[1764,1765],{"path":1832,"title":1833,"description":1834,"categories":1835,"draft":1767,"year":1836,"series":6},"\u002Fblog\u002Fdefer-in-golang","Understanding Defer In Golang","Learn about defer keyword in golang and how it can help you avoid panics due to bugs.",[1764,1765],"2021-05-05",{"path":1838,"title":1839,"description":1840,"categories":1841,"draft":1767,"year":1842,"series":6},"\u002Fblog\u002Fenums-golang","Implementing Enums in Golang","Enums are a way to defined set of constant values. Learn how to implement enums in Go using iota with examples.",[1764,1765],"2021-12-18",{"path":1844,"title":1845,"description":1846,"categories":1847,"draft":1767,"year":1848,"series":6},"\u002Fblog\u002Fenvironment-variable-golang","Guide to Environment variables in Go","Learn what are environment variables and how to use them in Go",[1764,1765],"2020-08-14",{"path":1850,"title":1851,"description":1852,"categories":1853,"draft":1767,"year":1854,"series":6},"\u002Fblog\u002Ferror-handling-golang","Handle errors the right way — Golang","How to handle errors in golang to make your life easy",[1764,1765],"2020-01-30",{"path":1856,"title":1857,"description":1858,"categories":1859,"draft":124,"year":1862,"series":1863},"\u002Fblog\u002Ffile-attack-document-macros","File Attack Deep Dives, Part 3: Document Macros","How malicious VBA hides in vbaProject.bin, which AutoOpen entry points fire it, and the sandbox signals that catch it.",[1860,1861],"Security","Systems","2026-09-17",{"name":1864,"part":93},"File Attack Deep Dives",{"path":1866,"title":1867,"description":1868,"categories":1869,"draft":1767,"year":1784,"series":1870},"\u002Fblog\u002Ffile-attack-field-guide","How File-Based Attacks Land: A Detection Engineer's Field Guide","A practical taxonomy of how malware and phishing arrive as files, why classic controls miss them, and how detection should think.",[1860,1861],{"name":1864,"part":72},{"path":1872,"title":1873,"description":1874,"categories":1875,"draft":124,"year":1876,"series":1877},"\u002Fblog\u002Ffile-attack-html-smuggling","File Attack Deep Dives, Part 2: HTML Smuggling","How attackers assemble malware inside the browser with Blob URLs, and the URL and script tells that catch it.",[1860,1861],"2026-09-10",{"name":1864,"part":83},{"path":1879,"title":1880,"description":1881,"categories":1882,"draft":124,"year":1883,"series":1884},"\u002Fblog\u002Ffile-attack-lnk-iso","File Attack Deep Dives, Part 5: LNK and ISO Smuggling","How ISO containers and weaponized shortcuts bypass Mark of the Web, and the forensic fields that catch them.",[1860,1861],"2026-10-01",{"name":1864,"part":115},{"path":1886,"title":1887,"description":1888,"categories":1889,"draft":124,"year":1890,"series":1891},"\u002Fblog\u002Ffile-attack-pdf-url-actions","File Attack Deep Dives, Part 4: PDF URL Actions","How PDF OpenAction, Launch, and URI actions turn opening a document into a phishing click, and the action audit that catches them.",[1860,1861],"2026-09-24",{"name":1864,"part":106},{"path":1893,"title":1894,"description":1895,"categories":1896,"draft":1767,"year":1897,"series":6},"\u002Fblog\u002Ffile-upload-golang","Uploading Files in Golang with Multipart Request","Learn how to upload files from your client to server as a multipart request in Golang.",[1764,1765],"2021-03-13",{"path":1899,"title":1900,"description":1901,"categories":1902,"draft":1767,"year":1904,"series":6},"\u002Fblog\u002Fgit-branch","Git Branch 101","Branching is a new path of development that makes it a lot easier to build features. Learn why and how to use branching in git.",[1903,1765],"Git","2022-03-20",{"path":1906,"title":1907,"description":1908,"categories":1909,"draft":1767,"year":1910,"series":6},"\u002Fblog\u002Fgit-pull-request-template","Guide to Pull Request Templates","Improve collaboration and code reviews with pull request templates. Blog include PR template and how to create one on github\u002Fgitlab",[1903,1765],"2023-08-24",{"path":1912,"title":1913,"description":1914,"categories":1915,"draft":1767,"year":1916,"series":6},"\u002Fblog\u002Fgit-remove-sensitive-info","Securing Git: Remove Sensitive Information","Protect your code from security breaches by using BFG tool to remove sensitive information from Git history. Learn how to do it in this comprehensive guide.",[1903,1765],"2023-10-16",{"path":1918,"title":1919,"description":1920,"categories":1921,"draft":1767,"year":1922,"series":6},"\u002Fblog\u002Fgit-tags-explained","Git tags : Explained","What Git tags are, why and when to use them, and how to start tagging releases in your own projects.",[1903,1765],"2020-06-18",{"path":1924,"title":1925,"description":1926,"categories":1927,"draft":1767,"year":1928,"series":6},"\u002Fblog\u002Fgo-dependency-injection","Dependency Injection in Go using Wire","Learn about dependency injection, its benefits and how to implement it in Go services using wire",[1764,1765],"2022-11-26",{"path":1930,"title":1931,"description":1932,"categories":1933,"draft":1767,"year":1934,"series":6},"\u002Fblog\u002Fgo-generics","Introduction to Generics in Go","Learn about generics in Golang, it's benefits and how to implement it in applications.",[1764,1765],"2022-11-27",{"path":1936,"title":1937,"description":1938,"categories":1939,"draft":1767,"year":1940,"series":6},"\u002Fblog\u002Fgo-in-memory-cache","Building In-Memory Cache in Go","Learn about in-memory caching in Golang, it's benefits and how to implement it with and without generics with a TTL(expiry).",[1764,1765],"2024-03-28",{"path":1942,"title":1943,"description":1944,"categories":1945,"draft":1767,"year":1946,"series":6},"\u002Fblog\u002Fgo-makefile","Ultimate Makefile for Golang","Boost your productivity and save time with ultimate Makefile for Golang projects.",[1764,1765],"2024-06-10",{"path":1948,"title":1949,"description":1950,"categories":1951,"draft":1767,"year":1952,"series":6},"\u002Fblog\u002Fgo-middleware","Mastering Middlewares in Golang","Learn about middlewares, their use cases and how to implement them in Golang applications",[1764,1765],"2022-03-13",{"path":1954,"title":1955,"description":1956,"categories":1957,"draft":1767,"year":1959,"series":6},"\u002Fblog\u002Fgo-naming-conventions","Naming Conventions in Golang","Why naming conventions matter in Go, with best practices and practical examples for clear, readable, maintainable code.",[1764,1765,1958],"Code Quality","2023-05-19",{"path":1961,"title":1962,"description":1963,"categories":1964,"draft":1767,"year":1966,"series":6},"\u002Fblog\u002Fgo-with-redis","Go with Redis","A practical introduction to using Redis with Golang to make your applications faster with in-memory data storage.",[1764,1965,1765],"Database","2020-05-03",{"path":1968,"title":1969,"description":1970,"categories":1971,"draft":1767,"year":1972,"series":6},"\u002Fblog\u002Fgolang-maps","Learn Maps in Golang (with examples)","A complete guide to maps in Golang: creating maps, adding and removing items, iterating, and how map equality works.",[1764,1765],"2020-09-10",{"path":1974,"title":1975,"description":1976,"categories":1977,"draft":1767,"year":1978,"series":6},"\u002Fblog\u002Fguide-to-cdn","Guide to Content Delivery Network","CDN is one of the backbone of modern world internet infrastructure. Learn about Content Delivery Network, it's working, types and benefits.",[1813,1765],"2022-01-23",{"path":1980,"title":1981,"description":1982,"categories":1983,"draft":1767,"year":1984,"series":6},"\u002Fblog\u002Fguide-to-rule-engines","Guide to Rule Engines","Rule Engines help in solving changing business requirements with ease. Learn all about Rule engines, it's working, benefits and how to implement one in Golang",[1764,1765],"2022-09-12",{"path":1986,"title":1987,"description":1988,"categories":1989,"draft":1767,"year":1990,"series":6},"\u002Fblog\u002Fhexagonal-architecture","Guide to Hexagonal Architecture","Learn how to design efficient application with hexagonal architecture with practical example",[1813,1765],"2020-12-13",{"path":1992,"title":1993,"description":1994,"categories":1995,"draft":1767,"year":1996,"series":6},"\u002Fblog\u002Fhttp-status-codes","Learn HTTP Status Codes","A tour of HTTP response status codes, what each class means, and when to use which code in your applications.",[1805,1765],"2020-07-30",{"path":1998,"title":1999,"description":2000,"categories":2001,"draft":1767,"year":2002,"series":6},"\u002Fblog\u002Fintroduction-to-goroutines","Introduction to Goroutines","Understand the basics of concurrency and learn how to work with Goroutines in golang.",[1764,1765],"2021-04-10",{"path":2004,"title":2005,"description":2006,"categories":2007,"draft":1767,"year":2008,"series":6},"\u002Fblog\u002Fjson-in-postgres-with-golang","Storing JSON in Postgres with Golang","Learn how to store JSON objects in Postgres and how to implement it in Golang.",[1765,1965,1764],"2021-02-13",{"path":2010,"title":2011,"description":2012,"categories":2013,"draft":1767,"year":2014,"series":6},"\u002Fblog\u002Fjson-web-token","Complete Guide to JWT","JSON Web Tokens are a very compact way to carry information. Learn about JWTs in depth, from its structure to when to use it.",[1765,1805],"2021-11-20",{"path":2016,"title":2017,"description":2018,"categories":2019,"draft":1767,"year":2020,"series":6},"\u002Fblog\u002Flearn-to-say-no","Learning to say No","Learn why it's important to say 'NO'. How it helps in increasing productivity and explore strategies for saying No",[1797,1796],"2022-04-09",{"path":2022,"title":2023,"description":2024,"categories":2025,"draft":1767,"year":2026,"series":6},"\u002Fblog\u002Flearn-unlearn-relearn","Learn - Unlearn - Relearn","Unlearning things to learn new is the way to grow. Discover how to do that!",[1783,1797],"2020-09-25",{"path":2028,"title":2029,"description":2030,"categories":2031,"draft":1767,"year":2032,"series":6},"\u002Fblog\u002Flinting-in-golang","Introduction to Linting in Go","Introduction to improving code quality using linting. Learn how to add linting in your Go projects.",[1764,1765],"2021-07-07",{"path":2034,"title":2035,"description":2036,"categories":2037,"draft":1767,"year":2038,"series":6},"\u002Fblog\u002Fload-balancing","Load Balancing 101","Complete guide on load balancers explaining the internal working and how does it help in making applications efficient.",[1813,1765],"2021-05-29",{"path":2040,"title":2041,"description":2042,"categories":2043,"draft":1767,"year":2044,"series":6},"\u002Fblog\u002Fmaking-decisions-the-right-way","Making Decisions: The right way","Decisions are hard! Learn how to make the right decisions always",[1783,1797],"2020-06-07",{"path":2046,"title":2047,"description":2048,"categories":2049,"draft":1767,"year":2051,"series":6},"\u002Fblog\u002Fmanage-logs-with-logrotate","Using Logrotate to manage logs","Learn how to use logrotate system utility to manage logs with example",[2050,1765],"Linux","2020-09-08",{"path":2053,"title":2054,"description":2055,"categories":2056,"draft":1767,"year":2057,"series":6},"\u002Fblog\u002Fmarshal-structs-golang","Marshal structs the right way: Golang","Why Golang marshals empty structs into your JSON instead of null, and how to marshal structs the right way.",[1764,1765],"2020-03-31",{"path":2059,"title":2060,"description":2061,"categories":2062,"draft":1767,"year":2063,"series":6},"\u002Fblog\u002Fnotes-almanack-naval","Book Notes : Almanack of Naval Ravikant","My notes\u002Fhighlights from Almanack of Naval Ravikant book by Eric Jorgenson",[1796,1797],"2020-10-17",{"path":2065,"title":2066,"description":2067,"categories":2068,"draft":1767,"year":2069,"series":6},"\u002Fblog\u002Fnotes-anything-you-want","Book Notes : Anything you want","My notes\u002Fhighlights from Anything you want book by Derek Sivers",[1796,1797],"2021-09-25",{"path":2071,"title":2072,"description":2073,"categories":2074,"draft":1767,"year":2076,"series":6},"\u002Fblog\u002Fnotes-getting-real","Book Notes : Getting Real","My notes and highlights from Getting Real by Jason Fried and David Heinemeier Hansson on building web applications.",[1796,2075],"Startups","2020-11-03",{"path":2078,"title":2079,"description":2080,"categories":2081,"draft":1767,"year":2082,"series":6},"\u002Fblog\u002Fnotes-hell-yeah-or-no","Book Notes : Hell Yeah or No","My notes\u002Fhighlights from Hell Yeah or No book by Derek Sivers",[1796,1797],"2020-09-16",{"path":2084,"title":2085,"description":2086,"categories":2087,"draft":1767,"year":2088,"series":6},"\u002Fblog\u002Fnotes-how-to-be-a-capitalist","Book Notes : How to Be a Capitalist Without Any Capital","My notes\u002Fhighlights from How to Be a Capitalist Without Any Capital by Nathan Latka",[1796,2075],"2020-01-07",{"path":2090,"title":2091,"description":2092,"categories":2093,"draft":1767,"year":2095,"series":6},"\u002Fblog\u002Fnotes-lean-b2b","Book Notes : Lean B2B","My notes and highlights from Lean B2B by Étienne Garbugli on assessing markets, building MVPs, and selling to businesses.",[1796,2094],"Entrepreneurship","2022-07-02",{"path":2097,"title":2098,"description":2099,"categories":2100,"draft":1767,"year":2102,"series":6},"\u002Fblog\u002Fnotes-lets-talk-money","Book Notes : Let's Talk Money","My notes and highlights from Let's Talk Money by Monica Halan on managing personal finances and savings.",[1796,2101],"Personal Finance","2021-02-26",{"path":2104,"title":2105,"description":2106,"categories":2107,"draft":1767,"year":2108,"series":6},"\u002Fblog\u002Fnotes-obviously-awesome","Book Notes : Obviously Awesome","My notes and highlights from Obviously Awesome by April Dunford on product positioning and marketing strategy.",[1796,2075],"2020-04-26",{"path":2110,"title":2111,"description":2112,"categories":2113,"draft":1767,"year":2115,"series":6},"\u002Fblog\u002Fnotes-refactoring-ui","Book Notes: Refactoring UI","My notes and highlights from Refactoring UI by Adam Wathan and Steve Schoger, full of practical design tips for engineers.",[1796,2114],"Design","2020-05-09",{"path":2117,"title":2118,"description":2119,"categories":2120,"draft":1767,"year":2121,"series":6},"\u002Fblog\u002Fnotes-rework","Book Notes: Rework","My notes and highlights from Rework by Jason Fried and David Heinemeier Hansson on a better way to succeed in business.",[1796,2075],"2021-04-14",{"path":2123,"title":2124,"description":2125,"categories":2126,"draft":1767,"year":2128,"series":6},"\u002Fblog\u002Fone-on-one-meetings","Guide to Effective 1:1 Meetings","One on One meetings are important for your personal & professional growth. Learn how to master 1:1s with your manager and peers.",[2127,1783],"Career","2023-03-05",{"path":2130,"title":2131,"description":2132,"categories":2133,"draft":1767,"year":2134,"series":6},"\u002Fblog\u002Fpersonal-okrs","Personal OKRs for Success","Why one should set personal OKRs and how to achieve success with them",[1783,1797],"2020-06-27",{"path":2136,"title":2137,"description":2138,"categories":2139,"draft":1767,"year":2141,"series":6},"\u002Fblog\u002Fpoker-tips","Poker Tips: Johns Hopkins Poker Class","Notes from Johns Hopkins poker course. This guide will help you improve in Poker and win some large pots.",[1797,2140],"Poker","2020-06-13",{"path":2143,"title":2144,"description":2145,"categories":2146,"draft":1767,"year":2147,"series":6},"\u002Fblog\u002Fpomodoro","Get work done: The Pomo Way","Learn to focus and get productive by following the Pomodoro Technique",[1783],"2020-10-24",{"path":2149,"title":2150,"description":2151,"categories":2152,"draft":1767,"year":2153,"series":6},"\u002Fblog\u002Fpostgres-constraints","Postgres Constraints","Constraints are line of defense for database. Explore various types of constrainsts in postgres",[1965,1765],"2020-11-07",{"path":2155,"title":2156,"description":2157,"categories":2158,"draft":1767,"year":2159,"series":6},"\u002Fblog\u002Fppf-explained","PPF Explained","Learn basics about Public Provident Fund and why you should invest",[1797,2101],"2020-12-24",{"path":2161,"title":2162,"description":2163,"categories":2164,"draft":1767,"year":2165,"series":6},"\u002Fblog\u002Fproductivity-chrome-extensions","Boost Productivity with Chrome Extensions","Utitizing chrome extensions to boost your productivity!",[1783,1806,1805],"2020-04-24",{"path":2167,"title":2168,"description":2169,"categories":2170,"draft":1767,"year":2171,"series":6},"\u002Fblog\u002Fproductivity-in-vscode","Improve your productivity with VS Code","Key VS Code features like the integrated terminal, shortcuts, and extensions that improved my everyday productivity.",[1783,1765],"2020-03-12",{"path":2173,"title":2174,"description":2175,"categories":2176,"draft":1767,"year":2177,"series":6},"\u002Fblog\u002Freading-101","Improving Reading 101","Why reading matters, how to build a reading habit, and what to read next - from my own journey into books.",[1796,1797],"2020-04-04",{"path":2179,"title":2180,"description":2181,"categories":2182,"draft":1767,"year":2183,"series":6},"\u002Fblog\u002Freverse-proxy","Understanding Reverse Proxy","Learn about reverse proxy, how it is different from forward proxy and explore advantages of using it in system design.",[1813,1765],"2021-10-03",{"path":2185,"title":2186,"description":2187,"categories":2188,"draft":1767,"year":2189,"series":6},"\u002Fblog\u002Frunning-periodic-background-task-golang","Running periodic background tasks in Golang","How to run periodic background tasks in Golang by combining cron-style scheduling with background execution.",[1764,1765],"2019-11-21",{"path":2191,"title":2192,"description":2193,"categories":2194,"draft":1767,"year":2195,"series":6},"\u002Fblog\u002Fsessions-in-golang","Sessions using Golang and Redis","How cookies and sessions work, and how to implement persistent login sessions in Golang using Redis.",[1764,1965,1765],"2020-02-25",{"path":2197,"title":2198,"description":2199,"categories":2200,"draft":1767,"year":2201,"series":6},"\u002Fblog\u002Fsolid-dry-kiss-yagni","Solid Dry Kiss Yagni","An introduction to the SOLID, DRY, KISS, and YAGNI principles and how they help you write cleaner, robust code.",[1820],"2020-07-17",{"path":2203,"title":2204,"description":2205,"categories":2206,"draft":1767,"year":2207,"series":6},"\u002Fblog\u002Fstack-in-golang","Implement Stack in Golang","Learn how to implement stack data structure in Golang (Full code)",[1764,1765],"2020-09-14",{"path":2209,"title":2210,"description":2211,"categories":2212,"draft":1767,"year":2213,"series":6},"\u002Fblog\u002Fstart-oss-today","Start your Open Source journey today","Start your OSS journey with intro to GIT. Participate in Hacktoberfest!",[1903,1765],"2020-09-19",{"path":2215,"title":2216,"description":2217,"categories":2218,"draft":1767,"year":2220,"series":6},"\u002Fblog\u002Fsticky-social-bar","Sticky social share component in HTML","Learn how to build a social media sharing component in HTML and add it to your website.",[1765,2219],"Frontend","2021-02-05",{"path":2222,"title":2223,"description":2224,"categories":2225,"draft":1767,"year":2226,"series":6},"\u002Fblog\u002Fterm-insurance","Term insurance Simplified","Everything you need to know before you buy a term insurance.",[1797,2101],"2020-11-29",{"path":2228,"title":2229,"description":2230,"categories":2231,"draft":1767,"year":2233,"series":6},"\u002Fblog\u002Fterminal-output-with-redirection","Handling terminal outputs with Redirection","Learn how to handle terminal outputs with Redirection and saving it to files",[2050,2232,1765],"Terminal","2020-09-06",{"path":2235,"title":2236,"description":2237,"categories":2238,"draft":1767,"year":2239,"series":6},"\u002Fblog\u002Fthink-and-grow-rich","Book Notes: Think and Grow Rich","My notes and highlights from Think and Grow Rich by Napoleon Hill, covering its process for building wealth.",[1796,1797],"2020-05-19",{"path":2241,"title":2242,"description":2243,"categories":2244,"draft":1767,"year":2245,"series":6},"\u002Fblog\u002Ftransactions-postgres-golang","Transactions on Postgres with Golang","Performing Postgres database operations in Golang with GORM, from basic queries to full transaction support.",[1764,1965,1765],"2020-03-18",{"path":2247,"title":2248,"description":2249,"categories":2250,"draft":1767,"year":2251,"series":6},"\u002Fblog\u002Fwaitgroups-in-golang","WaitGroups in Golang","Learn about WaitGroups in golang and how to use them to perform concurrent operations without blocking the main thread.",[1764,1765],"2022-05-31",{"path":2253,"title":2254,"description":2255,"categories":2256,"draft":1767,"year":2258,"series":6},"\u002Fblog\u002Fwhat-i-use","What I Use: Products and Softwares","List of what I use in my day to day life ranging from terminal, editors, softwares, devices to accessories",[1797,2257],"Tech","2024-06-01",{"path":2260,"title":2261,"description":2262,"categories":2263,"draft":1767,"year":2264,"series":6},"\u002Fblog\u002Fyear-in-review-2020","Year in Review: 2020","It's a wrap! 2020 was a crazy year, See how my year went!",[1797],"2020-12-31",{"path":2266,"title":2267,"description":2268,"categories":2269,"draft":1767,"year":2270,"series":6},"\u002Fblog\u002Fyear-in-review-2021","Year in Review: 2021","It's a wrap! 2021 was a mixed bag, full of ups and downs. Key Goal for 2022: Start now!",[1797],"2021-12-31",1788773187875]