效果对比 官方默认日志格式 # 官方默认日志格式 log_format main '$server_name $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for"'; # 输出结果 127.0.0.1 - -…
Nginx配置日志格式记录cookie1. 一般用来做UV统计,或者获取用户token等. 配置方式:  在nginx的配置文件中有个变量:$http_cookie来获取cookie的信息.配置方式很简单,只需要在nginx配置文件的http段,新添加一个log_format就可以了:http{log_format  hehe  '$remote_addr - $remote_user [$time_local] "$request" '               '$status…
eclipse/MyEclipse 日期格式.注释日期格式.时区问题 在eclipse/MyEclipse中,如果你的注释或是运行System.out.print(new java.util.Date());的时候,发现时间和系统的时间差8个小时. 那么就可以说明,你的时区和当前时区不对应.我们中国用的时区是Asia/Shanghai,你的差8小时应该是东八区的.关于这一点 你不懂可以看看初中地理:D. 解决办法有2种: 1.在你的eclipse/MyEclipse的JVM的jre运行参数中设置…
缘由:nginx.conf没有写log路径,所以debug的时候找不到日志,遂在conf文件里写入了log路径 Setp1.nginx默认日志路径: /var/log/nginx Setp2.conf写入log路径: access_log /var/log/nginx/xxxx_access.log; error_log /var/log/nginx/xxxx_error.log; 因为有几个不同的conf,所以在每个conf的log路径文件前面加了xxxx_作为区分.一个nginx.conf就…
我们经常在操作的时候会发现从后台传递到view层的json中datetime类型变成了long型,当然你也可以从后台先转为string类型,但是如果是从和数据库对应的object中封装的话,就不能再去转为string类型了,所以需要在js中进行序列化为我们常见的标准日期格式. 直接上代码,希望可以帮助到大家(另:本人近几天开始做一个 MVC4.0+WCF+EF+Bootstrap的架构系列博文,希望大家支持和指正): <script language="javascript"&g…
转载自:https://blog.csdn.net/yubin_yubin/article/details/18655553 在日期数据库数据查询出来的时候经常会to_char()一下,格式化一下日期格式在java中一般会用yyyy-mm-dd hh24:mm:ss的格式,然而在oracle中to_char(sysdate,'yyyy-mm-dd hh24:mm:ss')和to_char(sysdate,'yyyy-mm-dd hh24:mi:ss')有着巨大差别: select to_char…
https://jingyan.baidu.com/article/647f0115ea31b67f2048a85a.html 先中数据(不带标题),点击菜单-数据-分列. 前2步不要做任何更改直接点击"下一步",但是在第3步的时候讲常规切换为"日期",并且确保日期后面的格式顺序为YMD,也就是年月天的排列顺序. 点击完成以后返回到表格,我们会看到A列的形式有所变化,不过依旧不是我们想要的结果,此时点击鼠标右键"设置单元格格式": 在设置单元格格…
http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded…
2017年6月28日 to 2017-06-282017年10月27日 to 2017-10-272017年12月1日 to 2017-12-012017年7月1日 to 2017-07-01 #coding=utf-8 def func(string): year = string.find(u'年') month = string.find(u'月') day = string.find(u'日') if month-year==2: string = string.replace(u"年&…
<script language="javascript"> //扩展Date的format方法 Date.prototype.format = function (format) { var o = { "M+": this.getMonth() + 1, "d+": this.getDate(), "h+": this.getHours(), "m+": this.getMinutes(),…